0% found this document useful (0 votes)
416 views

Day 5 Customization R1

The document provides information on customizing Windchill information pages, including: 1. How to customize database column lengths for modeled attributes by adding entries to customization property files and regenerating class info objects and SQL scripts. 2. The key areas that must be designed for an information page including the action menu, item identification, tab navigation, third-level navigation, and content area. 3. How information pages are constructed from actions and action models, and the process flow for rendering an information page using builders, views, and the infoPage tag.

Uploaded by

Vindya Prasad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
416 views

Day 5 Customization R1

The document provides information on customizing Windchill information pages, including: 1. How to customize database column lengths for modeled attributes by adding entries to customization property files and regenerating class info objects and SQL scripts. 2. The key areas that must be designed for an information page including the action menu, item identification, tab navigation, third-level navigation, and content area. 3. How information pages are constructed from actions and action models, and the process flow for rendering an information page using builders, views, and the infoPage tag.

Uploaded by

Vindya Prasad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

Windchill Customization

Day 05

1 1
Takeaway
At the end of this session you should be able to
Customizing DB Column length
Information Page

2 2
Customizing DB Column
It is sometimes desirable to increase DB column lengths associated with specific object
attributes. This can be implemented using the following steps which describe changing
the length of the name attribute for a WTPartMaster object.
Using a Windchill shell, run the following command to check the existing column length for the
name attribute for WTPartMaster, InfoReport wt.part.WTPartMaster Check the output file, and
the DEFINED_AS and UPPER_LIMIT values for the name PropertyDescriptor
Create the file wtCustom/wt/part/partModel.properties and add an entry to increase the
UPPER_LIMIT value, eg. WTPartMaster.name.UpperLimit=200
Implement the column length change using the following ant script ant -f
<Windchill>\bin\tools.xml custom_column -Dgen.input=wt.part
Re run InfoReport and confirm that the UPPER_LIMIT value for name has been increased.
Use SQL to manually update the WTPartMaster table to extend the column length for name and
re-create any dependent indexes
Take care to use the correct db user when updating the Oracle tables. Later versions of Windchill may have two
different users, (Windchill App User & Windchill Install User), that are defined with different privileges

3 3
Exercise
To change the column length for a modeled attribute, perform the following steps:
1. Determine which customization property entry must be added.
2. Add the customization entry to the appropriate customizations property file.
3. Generate the class info objects and SQL scripts.
4. Verify the customization.
5. Create the database tables.
6. Restart the method servers if they were running during the procedure.
The following example sets the column length for the name attribute of the
wt.doc.WTDocumentMaster class to 80. The following steps describe how to determine
which customizations property file entry will contain the new column length, and how to
set the value.

4 4
Exercise
Determine which customization property entry must be added:
a. Obtain an info report for the class by executing the following command:
infoReport wt.doc.WTDocumentMaster
b. Inspect the value of the WTIntrospector.UPPER_LIMIT property
(the value being customized) of the name PropertyDescriptor: getValue( WTIntrospector.UPPER_LIMIT ) :
60
c. Inspect the value of the WTIntrospector.DEFINED_AS property of the name PropertyDescriptor:
getValue( WTIntrospector.DEFINED_AS ) :
wt.doc.WTDocumentMaster.name
d. Based on this information, use the following values:
The customization property file is <Windchill>\wtCustom\wt\doc\docModel.properties.
The customization property entry is "WTDocumentMaster.name.UpperLimit".

5 5
Exercise
2. Add the customization property entry to the appropriate customizations property file. In this example, add the
following entry to <Windchill>\ wtCustom\wt\doc\docModel.properties (create this file if it does not exist):
WTDocumentMaster.name.UpperLimit=180
# ignore multi-byte database character sets when setting value
3. Generate the class info objects and the SQL scripts. Update the serialized info
object and the SQL script for the customized class by entering the following
command (on one line):
ant -f <Windchill>\bin\tools.xml custom_column -Dgen.input=wt.doc
4. Verify the customization:
a. Obtain an info report for the class and inspect the UPPER_LIMIT value as described in the preceding steps. The
value should reflect the customization.
b. If the info report value is unchanged, verify that the generate step actually updated the following serialized info file:
<Windchill>\codebase\wt\doc\WTDocumentMaster.ClassInfo.ser

6 6
Exercise
Execute the folowing SQL Commands to remove the existing WTDocumentMaster indexes and increase the length of the
name column in Oracle
SQL > @\db\sql\wnc\Foundation\wt\doc\drop_WTDocumentMaster_Index.sql
SQL >alter table WTDocumentMaster modify name VARCHAR2(180);
SQL > @\db\sql\wnc\Foundation\wt\doc\create_WTDocumentMaster_Index.sql
Restart Windchill and confirm Document can be created with name field length > 160 characters

In this example, WTDocumentMaster.name is also the source for the derived attribute WTDocument.name. This derived
attribute, WTDocument.name, gets its UpperLimit from the source attribute, WTDocumentMaster.name. A derived
attribute cannot set the UpperLimit property in the annotation. Therefore, the derived attribute cannot be customized in
this manner.

7 7
Understanding Info Page
When implementing info pages, the following
sections must be designed to describe the UI.
Action Menu
Item Identification
New Tab navigation
New tab navigation includes the third-level
navigation menu.
Third-level navigation
Third-level navigation includes contents for
displaying on content area.
Content Area
Attributes and Visualization are now content
just like any other content and are not always
visible on the page; they are generally available
on the Details tab.

8 8
Title Bar Area
Title Bar Area consists of several configurations such as the following:
1. Go to latest link (only appears on the info pages for non-latest versions)
2. Actions Menu
3. Commonspace/Workspace toggle
4. Object Type icon
5. Item Identification
6. Status Glyphs (checkout, share, pending changes, and so on)
7. State of item (only appears for LifeCycleManaged items)
8. Help icon

9 9
Tab Navigation
There are three types of tabs User Created
Out of the Box End User can edit content freely add/remove/move
End User can add and remove tabs freely
End User can’t edit content of the tabs
Defined through the UI
End User can’t remove the tabs
Stored in the DB
End User can’t rename the tabs
Defined as an action model in XML Action to Add Tabs
Content is also defined in action XML The user can reorder all three types of tabs
Admin Created Command line tool for transferring tab configures
End User can’t add/remove content in tabs
from test to production
End User can’t remove the tabs
End User can’t rename the tabs
End User can move content within the tab
Available to the entire site or org
Defined through the UI
Stored in the DB

10 10
Ready for Info Page Design
How to Control for Each Part of Information Page
Before creating the Info page, configuration should be ready because many
parts of the UI design because the Info pages are separated by setting up
action and action model.
Action and Action Model
Action Menu (if it is not set, it will automatically set the parent object’s Action Menu)
New tab navigation
Third-level navigation
MVC component or JSP
Content area
Information Page component
Item Identification

11 11
JCA Debug
Look Action and Action Model Report
JCA Debug in info page gives us more useful action and action model reports.
Can know Info page builder class
Can know action model report for Tab and third-level content configuration

12 12
Architecture of Custom Information Page
Progress of Calling Info Page
Generally, Info page will be called from info page action in UI (OOTB). This time, the system progresses to
find the correct info page action. Finally, Windchill 10 architecture starts finding registered MVC class for
targeted object which displays info page.

13 13
Architecture of Custom Information Page
Information Page Process Flow
Following is the process sequence for
rendering the info page.
The builder is called first to collect the
necessary data from the server. The builder
forwards the request to the view (that is,
infoPage.jsp).
The default view, infoPage.jsp, includes the
infoPage tag.
The tag creates a JSON object, known as the
infoModel object, from the data it collected
from the builder.
The infoModel is serialized (by writing it out as
JSON string to the JSP writer) and passed to
the JavaScript render which ultimately
generates the HTML.

14 14
Architecture of Custom Information Page
Contents of Configuration Lists
Information page is needed to be ready for many kinds of configuration for creating new pages. First of all, you
must understand all related configuration.

15 15
Architecture of Custom Information Page
Introduction of Action Model for Information Page
You have to set three group of action
models for the info page.
TAB list
Third-level content lists (the lists of
customized button)
Action menu (optional) (If you do not
define, the info page will use parent
object’s action menu)
Submodel group (If you use
<submodel> in TAB list or third-level
contents)

16 16
Architecture of Custom Information Page
Description of Action Model
<!-------- CUSTOM MENU LIST -------->
<model name="third_level_nav_part">
<submodel name="general"/> <!-- General -->
<submodel name="relatedItems"/> <!-- Related Objects -->
<submodel name="changes"/> <!-- Change -->
<submodel name="history"/> <!-- History -->
<submodel name="collaboration"/> <!-- Collaboration -->
<submodel name="prodAnalytics"/> <!-- Product Analytics -->
</model>
<!-------- ACTION MODEL FOR TAB -------->
<model name="partInfoPageTabSet" resource="com.ptc.core.ui.navigationRB">
<submodel name="partInfoDetailsTab"/>
<action name="productStructureGWT" type="psb"/> The content of tab can be
<submodel name="partInfoRelatedItemsTab"/> used one <action>. If you Existed in
<submodel name="changesTab"/> want to show several content
<submodel name="partInfoHistoryTab"/> in tab you should use
<submodel name="partInfoWhereUsedTab"/> <submodel>.
<submodel name="requirementTraceabilityTab" />
<submodel name="amlAvlTab" />
<submodel name="prodAnalyticsTab" />
</model> Some action must be included
<!-------- submodel Design if Tab set and third nav lists have submodel --------> in custom menu list. If the
<model name="partInfoDetailsTab" resourceBundle="com.ptc.core.ui.navigationRB"> action isn’t included in
<action name="visualizationAndAttributes" type="object"/> custom menu list, the action
<action name="attributes" type="object"/> will not be show in a body of
</model> info page.

Custom Menu List – This list will be shown in the customization menu.
Action model for Tab – This is the design of TAB.
Submodel – if “Custom menu list” and “Tab design” have sub model you must design for each of sub model

17 17
Architecture of Custom Information Page
Description of Action Model Custom Menu List)
<!-------- CUSTOM MENU LIST -------->
<model name="third_level_nav_part">
<submodel name="general"/> <!-- General -->
<submodel name="relatedItems"/> <!-- Related Objects -->
<submodel name="changes"/> <!-- Change -->
<submodel name="history"/> <!-- History -->
<submodel name="collaboration"/> <!-- Collaboration -->
<submodel name="prodAnalytics"/> <!-- Product Analytics -->
</model>

1. The Design of Custom Menu List is for showing


customize menu.
2. The action model can use <action> and <submodel>
tag.
3. If you are using <submodel> tag, you must design
submodel block.
4. All of action must be defined in the action.xml
Some tab content which is <action> will be not displayed although
it was included for tab design. In this case, the action will be
existed in custom menu list. (Issue of tab design)
If you used <submodel> for tab, all submodel action must be
existed on custom list.
If you used <action> directly in tab configuration, it doesn’t need to
add custom menu list.
18 18
Architecture of Custom Information Page
Description of Action Model (Tab Design)
<!-------- ACTION MODEL FOR TAB -------->
<model name="partInfoPageTabSet" resource="com.ptc.core.ui.navigationRB">
<submodel name="partInfoDetailsTab"/>
<action name="productStructureGWT" type="psb"/>
<submodel name="partInfoRelatedItemsTab"/>
<submodel name="changesTab"/>
<submodel name="partInfoHistoryTab"/>
<submodel name="partInfoWhereUsedTab"/>
<submodel name="requirementTraceabilityTab" />
<submodel name="amlAvlTab" />
<submodel name="prodAnalyticsTab" />
</model>

1. Tab design – This list will be shown for tab list on info page.
2. The action model can use <action> and <submodel> tag.
3. If you are using <submodel> tag, you must design submodel block.
4. The content action of <submodel> will be show third level content list below of target tab.
5. All of action must be defined in the action.xml
19 19
Architecture of Custom Information Page
Review custom MVC class of info page
Building info page is needed to use other Abstract Class component comparing table and tree.
1. Extend from “AbstractInfoConfigBuilder” abstract class
2. Implements from “ComponentDataBuilder” interface class
3. Register target object to system using annotation – @TypeBased(value = “$[CLASS_TYPE_NAME]")
4. Register info page id using annotation - @ComponentBuilder(value = ComponentId.INFOPAGE_ID)
5. Override “buildComponentData” function for getting instance of target object
6. Override “buildInfoConfig” function for building info pages. (Set InfoConfig instance for UI)

20 20
Architecture of Custom Information Page
MVC Function
The following is a general function list on the InfoConfig for designing of info page.
1. setNavBarName() : required
2. setTabSet() : required
3. setActionList()
4. setHelpContext()
5. setView()
6. addComponent()

setNavBarName() – Set the action model configuration of Customize menu list.


setTabSet() – Set the action model configuration of tab list design.
setActionList() – Set action menu set for context object of information page.

setHelpContext() – Set help context of context object.

setView() – If you have some special display or configuration for info page, you can make JSP for view and set the JSP. The JSP file must be located in
“$WT_HOME/codebase/WEB-INF/jsp”
setComponent() – If you want to add some especial component in identification line, set this function.

21 21
Architecture of Custom Information Page
Understanding the layout
Windchill 10 has a new design architecture which has used layout in type management. By using that architecture, you don’t
need a special page design for several complex design sets. Windchill OOTB action had been prepared by action set for
each of screen type templates like the following.
Show Primary/More attributes (Detail tab of info page)
Input attributes set (Create/Edit wizard page)
Etc (Several UI pages are using layout)

22 22
Architecture of Custom Information Page
Understanding the Layout
Screen Type of Layout
Screen type was already fixed by Windchill core, so the layout is just supported on the fixed screen type.
The screen type can be selected just one time by layout (if one layout selects a screen type, the type cannot be displayed on the other layout – except the
default layout).
If you want to use attribute lists on the other screen, you have to use attribute panel component.

23 23
Architecture of Custom Information Page
Understanding the Layout
Default Layout
Default layout is assigned for all screen types. So if the screen type doesn’t have a layout system, it will show the default layout.
Be careful that each type must have one default layout which uses all screen types.

The layout name doesn’t affect the system. Screen type has a real effect on the system .

24 24
Architecture of Custom Information Page
OOTB Action Set for Using Layout
The following is a sample of OOTB action set lists for using layout (it is not everything):
1. <action name="visualizationAndAttributes" type="object"/>: Show visualization and primary layout
2. <action name=" primaryAttributes" type="object"/>: Show primary attribute layout
3. <action name="attributes" type="object"/>: Show more attribute layout
4. <jca:wizardStep action="defineItemAttributesWizStep" type="object"/>: Show create attribute layout on wizard
5. <jca:wizardStep action="editAttributesWizStep" type="object"/>: Show edit attribute layout on wizard
6. <jca:wizardStep action="createDocumentSetTypeAndAttributesWizStep" type="document" />: Show create attributes layout for
document on wizard

The described action is for general action. If you want to use a special layout which is EPMDocument, you have to use the layout action.

25 25
Architecture of Custom Information Page
Example of Layout in Info Page
Info page uses layout especially for showing primary and more attributes.

<!-------- ACTION MODEL FOR TAB -------->


<model name="partInfoPageTabSet" resource="com.ptc.core.ui.navigationRB">
<submodel name="partInfoDetailsTab"/>
<action name="productStructureGWT" type="psb"/>
<submodel name="partInfoRelatedItemsTab"/>
Show attributes on “Detail” tab
<submodel name="changesTab"/>
<submodel name="partInfoHistoryTab"/>
<submodel name="partInfoWhereUsedTab"/>
<submodel name="requirementTraceabilityTab" />
<submodel name="amlAvlTab" />
<submodel name="prodAnalyticsTab" />
</model>
<model name="partInfoDetailsTab" resourceBundle="com.ptc.core.ui.navigationRB">
<action name="visualizationAndAttributes" type="object"/> Show visualization and primary attributes. And also
<action name="attributes" type="object"/> show more attributes(IBA)
</model>

This document will not describe how to use and create a layout. You can find several documents on the PTC support sites.

26 26
Exercise Add Custom Action on Customize Menu
Purpose of Adding Custom Action on Customize Menu
1. It can help you to understand how to add action on the new information page.
2. How to add customized contents (MVC or JSP) without non-modified info page source code (just changed
configuration).
3. Understanding to create a “custom new tab.”
4. Understanding which configuration file is needed to modify the info page and how to do it.
5. Design rule in the customize button:
TAB design for using <submodel>: This tab will show several contents in the area.
If page contents included in <submodel> do not exist on the customize menu, the contents will not be shown on the info page,
although you forcefully set the content to some tab.
TAB design for using <action>: This tab just shows one content. Although the content does not exist in the Customize menu lists, it
can be shown on the info page.

27 27
Exercise — Add Custom Action on Customize Menu

Find OOTB Action model and Builder source code


1. Open OOTB info page and look for jcaDebug.

Open one info page of WTPart and set jcaDebug on the WTPart info page for finding info builder class and action model file.

1. That is info builder class for WTPart OOTB.


Remember this class name.
2. The action model file name for designing of

WTPart info page.

28 28
Exercise — Add Custom Action on Customize Menu
Find Correct Action Model Name
2. Find action model name using the PartInfoBuilder class on OpenGrok site of PTC
OpenGrok has native source codes of Windchill; you can find OOTB info builder class and check which kind of configure name is used
for info page. Refer to the http://ah-grok.ptcnet.ptc.com/xref/x-20-
M010/wcEnterprise/PartClient/src/com/ptc/windchill/enterprise/part/mvc/builders/PartInfoBuilder.java link for part info builder.

1. The configuration name is configuration of Customize menu lists (remember this name)
If Customize menu contents are used on <submodel>, they must be registered in this area, although it didn’t set on the tab.
2. The configuration name for tab set
This is configured for tab design.

29 29
Exercise — Add Custom Action on Customize Menu
Update Action Model and Action
3. Open “PartClient-actionmodels.xml” and copy the “third_level_nav_part” block to custom action model. And the add
custom action. csc-actionmodels.xml <model name="third_level_nav_part" resourceBundle="com.ptc.windchill.enterprise.part.partResource">
<submodel name="general"/> <!-- General -->
<submodel name="relatedItems"/> <!-- Related Objects -->
<submodel name="changes"/> <!-- Change -->
<submodel name="history"/> <!-- History -->
<submodel name="collaboration"/> <!-- Collaboration -->
<submodel name="prodAnalytics"/> <!-- Product Analytics -->
<action name="infoSample01" type="csc"/>
</model>
4. Create a new action (if you do not have the action).
csc-actions.xml <objecttype name="csc" resourceBundle="com.ptc.core.ui.navigationRB">
<action name="infoSample01">
<command windowType="page" url="wtcore/jsp/csc/jca/tree/tree.jsp"/>
</action>
</objecttype>

5. If you don’t have a resource bundle, you must create resource bundle for action.
action.properties, action_[locale].properties
csc.infoSample01.description=Info Sample 01

6. Restart the Method Server service or Reload actions.

30 30
Exercise — Add Custom Action on Customize Menu
 Check the Customize button (add more actions for testing MVC).
Result

 Add more content and add the custom component and rename the
tab.

31 31

You might also like