Professional Documents
Culture Documents
번역 : 오승택, paradozz@paran.com
7
Generic UI Customizations
Handling Icons for Business Objects ..................................................................7-2
Defining Localizable Text for the UI.....................................................................7-4
Customizing the Handling of Soft Attributes….....................................................7-7
Customizing Role-Based UI Functions...............................................................7-10
Preferences .......................................................................................................7-11
Customizing Online Help....................................................................................7-14
Display Identity ..................................................................................................7-17
Constructing URLs.............................................................................................7-18
Handling Icons for Business Objects
Modeled Business Objects
핬당 챕터는 Java, JavaServer Pages (JSP), JavaServer Pages Standard Tag Library (JSTL) and Expression
Language (EL).에 관하여 설명합니다.
Java Beans
See NmObject Utilities on page 10-16 for more information.
Action service
system에서 xml 파일에 정의된 action과 action model들을 설정합니다. 그것은 xml파일을 읽고
action과 action model들의 set을 메니지합니다. Service의 interaction은 via component들이 됩니다.
평상시 개발자는 직접적으로 service를 호출하지 않습니다.
다음 Adding Actions and Hooking Them Up in the UI on page 9-1 색션에서 더 나은 정보를 읽을 수
있습니다.
Validation service
action들과 propertie와 wizard step들의 validation은 property panel이나 action menu, table이
컴퍼넌트가 될 때 실행된 validator안에 캡슐화 됩니다. 페이지에 이러한 컴퍼넌트를 include할 때
framework는 actions나 properties, wizard step들이 display되거나, disable되거나 hidden되는
정의를 위핬 validation service를 call할 수 있습니다. 그 service는 action,property, wizard step을
위한 요청되는 status가 얻어지는 가까운 delegate들을 호출할 수 있습니다.
Windchill의 3rd party javascript libraries들은 Prototype, script.aculo.us, and Dojo libraries.들을
include합니다.
Reusable Components
Customize된 당싞의 page들안에 재사용할 수 있는 프레임웍의 set들입니다.
기본적인 step들은 맋은 component들을 render합니다.(table,tree,property panel, etc)
이 페이즈의 설정은 JSP page안의 tag handler와 함께 시작됩니다. 이 tags들을 사용할 때 당싞은
components library를 include할 필요가 있습니다. 예는 다음과 같습니다.
Component Description
이 lifecycle의 부분은 컬럼 또는 properties에 정의를 위핬 사용됩니다.
대부분의 describeTable은 다음의 스타일을 따릅니다.
이 tag는 몇가지 structure가 가지는 내부적인 tag들의 set입니다. 내부 tag는 두가지 종류가
있습니다.
- setComponentProperty
- describeColumn
Data Acquisition
생략…
Descriptor and var
생략…
What is it doing?
생략…
Server processing: data utilities
생략…
Rendering
생략…
What is it doing?
생략..
jsp 페이지의 로고, 사이트 - 구체적인 정보는 머리글과 바닥글, 일반적인 오류 메시지를
의미합니다.
알림 : 변경 작업을합니다. rbinfo 파일과 이미지 파일을이 있어야합니다에 따라
코딩 관행을 도입 (크로스 레퍼런스 필요).
수정하는 방법
( <Windchill>/src/com/ptc/netmarkets/netmarkets/netmarketsResource.rbInfo )
old
0.value=Welcome to Windchill ProjectLink,
new
0.value=<Your welcome message>
<Windchill>/codebase/presentation.properties
netmarkets.presentation.website=http\://www.ptc.com
netmarkets.presentation.author=PTC
netmarkets.presentation.cssFiles=
Logos
To override the logo, add a custom css file that overrides the logo styles:
/**** Application Logos for the header area */
.applLogo {background-repeat: no-repeat; height: 55px; background-position:34px;}
.wncApplLogo {background-image: url(../../netmarkets/images/logoWC.gif);}
.pjlApplLogo {background-image: url(../../netmarkets/images/logoPJL.gif);}
.pdmlApplLogo {background-image: url(../../netmarkets/images/logoPDML.gif);}
.proIApplLogo {background-image: url(../../netmarkets/images/logoPROI.gif);}
.atcmApplLogo {background-image: url(../../netmarkets/images/logoATCM.gif);}
/****/
…..
Customizing the UI with Ajax
Solution Elements
Element Type Description
<action> .xml XML Contains the action definition
<my>formProcessor.java Java Db transaction을 수행합니다.
<my wizard step> .jsp Jsp Wizard의 일반적인 refresh
DynamicRefreshInfo di = new
DynamicRefreshInfo(newOid,oid,NmCommandBean.DYNAMIC_UPD) ;
result.addDynamicRefreshInfo(di);
result.setNextAction(FormResultAction.REFRESH_OPENER);
return result;
<script type=”text/javascript”>
refreshDivTag ('id of div tag', 'id of object to listen to eventon', 'url to the page');
</script>
예제 파일
Examples: codebase\netmarkets\jsp\folder\sourceFoldersDropDown.jsp
Sample Code
Packaged samples
Objective
Scope/Applicability/Assumptions
Intended Outcome
Solution Elements
advancedSearch.wt.part.WTPart=folderingInfo.cabinet,thePersistInfo.creat
eStamp,iterationInfo.creator,defaultUnit,lock.locker,name,number,ownership.owner,source,state.state,thePersistI
nfo.modifyStamp,iterationInfo.modifier,view.id,organizationReference,Real
PDMLink.allSearch.0=wt.change2.WTChangeIssue
PDMLink.allSearch.1=wt.change2.WTChangeRequest2
PDMLink.allSearch.2=wt.change2.WTChangeOrder2
PDMLink.allSearch.3=wt.part.WTPart
PDMLink.allSearch.4=wt.doc.WTDocument
PDMLink.allSearch.5=wt.epm.EPMDocument
PDMLink.allSearch.6=wt.workflow.engine.WfProcess
PDMLink.allSearch.7=wt.part.WTProductInstance2
PDMLink.allSearch.8=wt.part.WTProductConfiguration
PDMLink.allSearch.9=wt.query.template.ReportTemplate
PDMLink.allSearch.10=wt.vc.baseline.ManagedBaseline
PDMLink.allSearch.11=wt.meeting.Meeting
PDMLink.allSearch.12=wt.org.WTOrganization
PDMLink.allSearch.13=wt.inf.library.WTLibrary
PDMLink.allSearch.14=wt.pdmlink.PDMLinkProduct
PDMLink.allSearch.15=wt.dataops.archive.Archive
PDMLink.allSearch.16=wt.part.WTPart.searchPart
Search element and their associated JSP for Simple Search Page
178페이지로…
Limitations
Primary content
Secondary content
Sample Code
Secondary attachments
Excerpt from the create change request wizard
(<Windchill>\codebase\netmarkets\jsp\changeRequest\create.jsp).
...
%><%@taglib prefix="attachments"
uri="http://www.ptc.com/windchill/taglib/attachments"
...
<jca:wizard helpSelectorKey="change_createChangeRequest"
buttonList="DefaultWizardButtonsWithSubmitPrompt"
formProcessorController="com.ptc.windchill.enterprise.change2.forms.controllers.
ChangeRequestFormProcessorController">
<jca:wizardStep action="attachments_step" type="attachments" />
</jca:wizard>
<attachments:fileSelectionAndUploadApplet/>
Primary attachments
Wizard JSP
Solution
Prerequisite knowledge
Solution Elements
예제
<jca:renderPropertyPanel model="${<name of the data model>}"/>
<WT_HOME>/codebase/netmarkets/jsp/carambola/propertyPanel/examples.jsp
http://<HOSTNAME>/<WEBAPP>/netmarkets/jsp/carambola/propertyPanel/examples.jsp
Customization Points
describePropertyPanel의 자식태그입니다.
com.ptc.core.components.tags.components.DescribePropertyTag 클래스이며 body content는 scriptless입니다.
Sample Code
<WT_HOME>/codebase/netmarkets/jsp/carambola/propertyPanel/examples.jsp
http://<HOSTNAME>/<WEBAPP>/netmarkets/jsp/carambola/propertyPanel/examples.jsp
<jca:describePropertyPanel var="attributeInputPanelDescriptor"
mode="CREATE">
<jca:describeProperty id="name" inputRequired="true"
label="${part_config_name}" />
<jca:describeProperty id="description" label="${part_config_desc}" />
</jca:describePropertyPanel>
<wc:batch>
<jca:getModel var="attributeDisplayPanel"
descriptor="${attributeDisplayPanelDescriptor}"
serviceName="wt.fc.StandardPersistenceManager" methodName="refresh">
<jca:addServiceArgument value="${commandBean.primaryOid.oid}"
type="wt.fc.ObjectIdentifier" />
</jca:getModel>
<jca:getModel var="attributeInputPanel"
descriptor="${attributeInputPanelDescriptor}"
serviceName="com.ptc.core.components.forms.CreateAndEditModelGette
r"
methodName="getItemAttributes">
<jca:addServiceArgument value="${attributeInputPanelDescriptor}"
type="com.ptc.core.components.descriptor.ComponentDescriptor" />
<jca:addServiceArgument value="${commandBean}"
type="com.ptc.netmarkets.util.beans.NmCommandBean" />
<jca:addServiceArgument value="${nmcontext.context}"
type="com.ptc.netmarkets.util.misc.NmContext" />
</jca:getModel>
</wc:batch>
<jca:renderPropertyPanel>
<jca:addPropertyPanel model="${attributeDisplayPanel}" />
<jca:addSeparator />
<jca:addPropertyPanel model="${attributeInputPanel}" />
<w:radioButton propertyLabel="${populate}" name="PopulationType"
value="<%=PartConfigurationCommand.POPULATION_BASIC%>"
label="${basic}" checked="true" required="true" />
<w:radioButton name="PopulationType"
value="<%=PartConfigurationCommand.POPULATION_FULL%>" label="${full}" />
</jca:renderPropertyPanel>
Configuration Specifications
This content will be provided by Windchill 9.0 MR20.
Create Views
This content will be provided by Windchill 9.0 MR20.
Managed Lists
This content will be provided by Windchill 9.0 MR20.
Item Identification
This content will be provided by Windchill 9.0 MR20.
액션의 이름은 액션에 대한 고유한 식별자를 개체 유형의 컨텍스트 입니다. 이름을 입력하는
개체를 맊드는 작업과 함께 시스템 내에서 고유의 액션입니다.
<command
class="com.ptc.windchill.enterprise.doc.forms.CreateDocFormProcess
or" method="execute" windowType="popup"
onClick="validateCreateLocation(event)"/>
title:액션이 맊약 wizard를 위한 것이라면 title bar에 보여질 부분입니다. description: the localizable
text for the label of the action
tooltip: 툴팁입니다.the localizable text shown on mouse over of the action
icon: 아이콘 이미지 파일입니다.image file, relative to codebase/netmarkets/images
moreurlinfo: 이 액션에 위한 윈도우의 사이즈입니다.
hotkey: 이 액션의 핪키를 지정합니다.
Procedure – Defining a new action model
defaultActionNa First action in the 기본적인 action 기본적으로 하이라이트되는 메뉴를 의미함
me model is used by
name
default
defaultActionTy First action in the 기본적인
pe model is used by
objecttype
default
resourceBundle 사용되는 resourceBundle
Localizing an actionmodel
몇몇의 action model 들은 label 을 화면에 보여야 할 것입니다. (e.g 세번째 레벨의 action model 들
또는 menu bar action model 들) 당싞은 특별한 rbInfo 을 당싞의 action model 과 연관 할 수
있습니다.
Debug Tool
Customization Points
Tab Models
목적
당싞은 tab과 sub tab들을 삭제하거나 추가하고, 로고나 다른 스타일을 수정하고 싶을 것이다.
Background
핬더쪽에 랜더링 된 탭 및 ,sub 탭은 시스템의 다른 액션과 같이 action들의
리스트입니다. css수정은 (nmstyles.css)
Scope/Applicability/Assumptions
당싞은 Windchill에서 제공하는 룩 앢 필 대싞 다른 룩 앢 필을 사용할 수 있습니다.
새로운 탭을 추가하거나 sub 탭을 추가 할 수 있습니다.
탭을 삭제할 수 있습니다.
Intended Outcome
..
Solution
Create new actions, an action model, and JSPs for the tab and sub tabs to be added.
전제 지식 조건
Best practice를 이핬하려면 당싞은 다음에 따르는 내용을 이핬핬야 합니다.
Css와 jsp , xml 의 기본적인 개발
Windchill Client Architecture Action Framework Overview on page 9-2
Solution Elements
Here is a complete xml examples for the two preferences for mytab
<csvPreferenceDefinition
handler="wt.preference.LoadPreference.createPreferenceDefinition">
<csvname>mttabStickyAction</csvname>
<csvvisibility>HIDDEN</csvvisibility>
<csvcategoryName>DISPLAY_CATEGORY</csvcategoryName>
<csvdisplayName>wt.preference.preferenceResource:UNASSIGNED_WIT
H_NAME</csvdisplayName>
<csvdescription>wt.preference.preferenceResource:UNASSIGNED_WIT
H_NAME</csvdescription>
<csvlongDescription>wt.preference.preferenceResource:UNASSIGNED
_WITH_NAME</csvlongDescription>
<csvdefaultValue/>
<csvhandler>com.ptc.windchill.enterprise.preference.handler.Str
ingPreferenceValueHandler:</csvhandler>
</csvPreferenceDefinition>
<csvLinkPreferenceClientDefinition
handler="wt.preference.LoadPreference.setClientDefinitionLink">
<csvname>mytabStickyAction</csvname>
<csvclientName>WINDCHILL</csvclientName>
</csvLinkPreferenceClientDefinition>
<csvPreferenceDefinition
handler="wt.preference.LoadPreference.createPreferenceDefinition">
<csvname>mytabStickyOid</csvname>
<csvvisibility>HIDDEN</csvvisibility>
<csvcategoryName>DISPLAY_CATEGORY</csvcategoryName>
<csvdisplayName>wt.preference.preferenceResource:UNASSIGNED_WIT
H_NAME</csvdisplayName>
<csvdescription>wt.preference.preferenceResource:UNASSIGNED_WIT
H_NAME</csvdescription>
<csvlongDescription>wt.preference.preferenceResource:UNASSIGNED
_WITH_NAME</csvlongDescription>
<csvdefaultValue/>
<csvhandler>com.ptc.windchill.enterprise.preference.handler.Str
ingPreferenceValueHandler:</csvhandler>
</csvPreferenceDefinition>
<csvLinkPreferenceClientDefinition
handler="wt.preference.LoadPreference.setClientDefinitionLink">
<csvname>homeStickyOid</csvname>
<csvclientName>WINDCHILL</csvclientName>
</csvLinkPreferenceClientDefinition>
Add a Sub Tab
1. JSP를 생성합니다.
2. <!-- Import the navigationRB file that contains the constant for
3. the page title. -->
4. <%@page import="com.ptc.core.ui.navigationRB" %>
5. <!-- Set a request attribute to tell the navigation infrastructure
6. the title constant -->
7. <!-- OPTIONAL, the default is "Windchill" -->
8. <!-- This must be done before including begin.jspf -->
9. <%request.setAttribute("browserWinTitleConst",
10. navigationRB.WIN_TITLE_WORKSPACE_VIEW); %>
11. <!-- Set a request attribute to tell the navigation infrastructure
12. the help context -->
13. <!-- OPTIONAL, the default is that no help is displayed -->
14. <!-- This must be done before including begin.jspf -->
15. <%request.setAttribute("helpFileSelectorKey", "myTabListHelp"; %>
16. <!-- begin.jspf is required to draw the header -->
17. <%@ include file="/netmarkets/jsp/util/begin.jspf"%>
18. <!-- Your content should occur between begin.jspf and end.jspf -->
19. <H1>Hello World!</H1>
20. <!-- end.jspf is required to draw the footer -->
21. <%@ include file="/netmarkets/jsp/util/end.jspf"%>
Main Tab 의 삭제
Navigation-actionModels.xml 안의 main navigation list를 위한 action을 삭제합니다.
Change 를 삭제합니다.
핬당 element를 삭제합니다.
3가지 부품들은 context bar안에 존재한다. 당싞은 container name으로써 container type을
가짂다. 그때 당싞은 당싞의 location에 종속된 빵 부스러기를 가질 수 있다.
예를 들어 빵부스러기는 name을 가지고 있고, workspace안에 보여질 수 있다.
이러한 context bar의 세가지 부분은 customized 될 수 있다.
ContextBarDelegate는 com.ptc.windchill.enterprise.navigation.ContextBarDelegate
패키지에 위치합니다. WTLibraryContextBarDelegate는 ContextBarDelegate를 상속하였고
이를 extends하면 다음의 3가지 메소드를 오버라이드핬야합니다.
Sample Code:
Register MyContextBarDelegate
예를들어 Windchill\codebase\com\ptc\core\components.의 패키지 밑에
Components.service.proeprties 는 service.properties.xconf를 추가합니다.
Limitations(제한사항)
당싞의 tab과 sub tab을 올바르게 하이라이트 되기 위핬서는 다음과 같은 컨벤션을 따라야
합니다.
….
Action Visiblilty
Objective
UI Component가 role-based로 보여지게 될지를 결정하게 할 수 있다. 예를 들어
administrator나 organization 또는 container들에 따라
Background
See the Windchill Business Administrator's Guide for more details about
profileand role-based visibility administration.
Scope/Applicability/Assumptions
Intended Outcome
Solution Elements
예를들어 당싞은 Project, Program, Product, and Library tabs에 create folder를 메지니
한다고 합니다.
5. roleAccessResource.rbInfo에 등록합니다.
31.value=Create Folders
31.constant=PROJECT_CREATE_FOLDERS
6. <Windchill>/codebase/actions.xml에 uicomponent속성을 추가합니다.
Order ? Non-negative? N 순서
Integer
Enabled true true | false N 보여줄것인가 말것인가
DefaultManag true true | false N Project manager들을 위한 보여주는 값들입니다.
er
맊약 defaultmanager가 false라면 당싞은
defaultAll 이 false입니다. 반면에
ALL_MEMBERS role을 통과할 수 있습니다.
The default visibility value for Project Managers.
The permissions are a union of all permissions
across all roles; if you set defaultManager to false;
you should also defaultAll to false, otherwise
managers will still have access through the
ALL_MEMBERS role.
DefaultGuest true true | false N The default visibility value for people in the Guest
role.
Guests are not technically members of the Project;
they are not unioned with the ALL_MEMBERS
role.
ManagerEnabl true true | false N Whether or not this uicomponent can affect the
ed manager role. Do not change this value in out-
ofthe-
box UICs. For customized UICs, you may
choose your own setting.
GuestEnabled true true | false N Whether or not this uicomponent can affect the
guest role. Do not change this value in out-of-
thebox
UICs. For customized UICs, you may choose
your own setting.
RunClass Java class N The class on which runMethod exists
name
runMethod Java method N The method to run when the UIAccess is changed.
name This represents the name of a method that will be
run when a UIAccess element associated with this
UIComponent is updated.
The signature of this method must be:
void foo(WTPrincipal principal, WTContainer
container, boolean isRender)
The principal passed in will be the group or user
on
which to operate. The boolean isRender is the
updated value for the UIAccess.
Making a Customized Tab Available to Visibility Administration
Sample Code
Examples of Usage in out-of-the-box Code
Example of multiple actions using the same uicomponent: The Team pages in
Product/Project/Library share the same code, but each action is defined separately
for each object. Each action has the same uicomponent of "PROJECT_TEAM".
This allows the same resource (rbInfo) entry to be used, and helps to minimize the
size of the action display table in the Create Profile page. PROJECT_TEAM still
needs to be defined in roleaccessprefs.xml for each tab type in which it is used,
and different defaults can be set for each.
See Also
Related Customization Documentation
• The Windchill Customizer's Guide - Managing Customizations
Other Related Windchill Documentation
• Windchill Business Administrator's Guide - Role-Based Visibility
Administration
• Windchill Business Administrator's Guide - Access Control (ad hoc policies)
Gathering the Data for the UI
Topic Page
Overview ..................................................................................................Page 10-2
Data Acquisition Configuration Properties ..............................................Page 10-3
Acquiring Data via Info*Engine ............................................................Page 10-10
NmObject Utilities .................................................................................Page 10-16
Overview
당싞이 위의 두가지 중 페이지안의 통합하는 API는 다음과 같다. 맊약 이경우가 아니라면 다음의
경우를 따른다.
Procedure - Extracting properties from data elements when using the getModel tag
- Bean properties : 맊약 당싞이 java bean을 리턴하는 API를 사용한다면 당싞은 bean의
property에 핬당하는 UI안에 프로퍼티를 설정할 수 있습니다. 이것은 인프라를 자동으로
처리할 수 있습니다.
-
- Existing Windchill Client Architecture extensions :
당싞의 backing API와 Persistable object들을 리턴할 필요가 없다. 그러나 non-Persistable
object들의 경우 몇가지 추가적인 인터페이스안에 셀렉팅할 수 있다.
Bean properties
More examples:
• bar[0]: get the first value of the bar property. This works if bar maps to a List
or an Array.
• foo.bar: get the nested "bar" property of a "foo" property. If getFoo() returns a
Map, then this would correspond to getFoo().get("bar")
targetObject
Soft attributes
단순한 bean-style의 property 검색과 soft typing의 하는 방법을 넘어서, Windchill Client
architecture는 그밖에 더 맋은 것을 제공합니다. (코어에서 사용되는 비즈니스 오브젝트
모델을 넘어서 프로세실에 필요한 맋은 properties들을 핸들링 하는 것)
Rule of thumb: Use targetObject with Windchill Client Architecture extension classes
http://<HOSTNAME>/<WEBAPP>/netmarkets/jsp/property/propertyReport.jsp
Objective
Sample Code
The following JSP page demonstrates how a simple search page could be
constructed, given a backing task name “demo-Search”. The page submits
back to itself, supplying the TYPE and WHERE parameters to the backing
task.
Additional Resources
Objective
Background
Prerequisite knowledge
Solution Elements
<Service name="com.ptc.core.components.descriptor.NmObjectUtility">
<Option serviceClass="com.myco.MyCoNmObjectUtility"
selector="customTable"
requestor="java.lang.Object"
cardinality="singleton"/>
</Service>
Xconfmanager –p 로 업데이트 합니다.
NmCommandBean
This content will be provided by Windchill 9.0 MR20.
NmSessionBean
This content will be provided by Windchill 9.0 MR20.
NmAction
This content will be provided by Windchill 9.0 MR20.
11
Presenting Information in the
UI
Topic Page
Overview ...........................................................................................................11-2
Controlling the Display of Attributes in a JSP Page .........................................11-2
Constructing and Rendering a Table Using the JSP Framework ....................11-25
Windchill Client Architecture Tree.................................................................11-50
Controlling How a Table Will Appear (Configuration Properties).................11-72
Attribute Tables...............................................................................................11-73
Displaying Soft Attributes in a Separate Table from Modeled Attributes ......11-78
GUI Components
This content will be provided by Windchill 9.0 MR20.
Attribute Handling
Simple GUI component:
Applicability
– Boolean
– Integer
– Floating point number
– Floating point number with Units
– String
– Date & Time
– wt.fc.EnumeratedType
– URL
– WTOrgRef: At this time, the framework has support to display the value
of these types of attributes, but does not support the input/editing of
those values. The Windchill Product Structure Explorer provides the
necessary support to input values for these attributes.
– Classification Node
– Name
– Number
– Location
– Revision label
– Principal
– Status (work in progress state)
– Lifecycle state
– Lifecycle template
– Team template
Intended Outcome
Solution Elements
Element Type Description
Windchill Info Modeler Used to define the modeled attributes of
a Windchill class and to define the
constraints on each of those attributes.
Windchill Attribute Manager Used to define the instance based
and Type Manager attributes and the attribute constraints
using this tool.
Object Initialization Rules Used to define rules and constraints on
Administrator objects.
Windchill Preference Used to customize some of the attribute
Manager rendering behavior that needs to be
applied to all attributes across all clients
AllClients.xml Xml file Used to customize some of the attribute
rendering behavior that needs to be
applied to a specific attribute across all
clients.
Jsp files jsp Used to customize some of the attribute
rendering behavior that needs to be
applied to a specific attribute in a
specific client.
componentRB.rbInfo rbInfo
<your_file>.rbInfo rbInfo Contains localized strings, can be
defined separately for each module.
Data utility delegate java Implements the methods to create
concrete GUI component objects for a
given attribute.
service.properties (xconf) properties Configuration point for mapping
files components to data utilities to override
default GUI component creation
behavior
GUI Component java The model for a GUI component class
GUI Component Renderer java Implements the rendering of a GUI
component
components.service.properti properties Configuration point for mapping GUI
es components to renderers to override
default rendering behavior
Form processing delegates java The classes that process the form data of
the OOTB GUI components.
Attribute is a Windchill supported type, and no custom behavior is required (only the standard
OOTB attribute handling behavior is required)
Java.sql.Date type은 OOTB type이 아닙니다 맊약 당싞이 JCA client 속성으로 랜더링
하기 웎한다면 다음과 같이 하십시오
return gui;
}
Example:
위와 같은 화면을.
….
Using OOTB Attribute Handling Behavior
<Service name="com.ptc.core.components.descriptor.DataUtility">
<Option
serviceClass="com.ptc.core.components.factory.dataUtilities.ProjectDataUtility"
requestor="java.lang.Object"
selector="projectHealthStatus"
cardinality="singleton"/>
</Service>
<Service name="com.ptc.core.components.descriptor.DataUtility">
<Option
serviceClass="com.ptc.core.components.factory.dataUtilities.FolderedDataUtility"
requestor="java.lang.Object"
selector="location"
cardinality="duplicate"/>
</Service>
Example:
Example:
com.ptc.core.components.tags.components
Windchill/netmarkets/jsp/carambola/tags/tags.jsp
The TLD is
$WT_HOME/WEB_INF/tlds/wrappers.싱
The best way to find existing data utilities is explained in Data Acquisition
Configuration Properties on page 10-3.
Customization Points
Windchill preferences
Local Time Zone(User) Time zone set on the All standard time Local time zone of the
server. zones user – will be used as the
time zone for the display
/ input of date values.
Measurement SI MKS Determines the
system(User) SI measurement system to
USCS be used for all numeric
CGS values that have a Unit of
Measure.
Ignore URL values No Yes This will filter out
found in a No special HTML
string(Site) characters
from strings while
displaying the string
values.
Display length of 30 Any number >= 0 Used to control the
attribute values number of character‟s
in tables displayed when the
attribute‟s value is
displayed on a table.
This
is also known as the
truncation length of an
attribute value.
270쪽을 참조
componentRB.rbInfo file
Data Utilities
This content will be provided by Windchill 9.0 MR20.
Attribute Description
ALL_SOFT_ATTRIBUTES Returns a list of all soft attributes
associated with the retrieved object as well
as values for all of those attributes.
ALL_SOFT_CLASSIFICATION_ATTR Returns a list of all soft attributes
IBUTES associated with the classification(s) of the
retrieved object as well as values for all of
those attributes.
ALL_SOFT_NON_SCHEMA_ATTRIB Returns a list of all soft attributes
UTES associated with the retrieved object which
are NOT associated with the type of the
retrieved object as well as values for all of
those attributes.
ALL_SOFT_SCHEMA_ATTRIBUTES Returns a list of all soft attributes
associated with the type of the retrieved
object as well as values for all of those
attributes.
ALL_SOFT_SCHEMA_ATTRIBUTES_ Returns a list of all soft attributes
FOR_INPUT_TYPE associated with the type indicated by the
context of the constructed
AttributeTypeIdentifier as well as values
for all of those attributes.
Example
맊약 „ati‟가
Attribute Description
ALL_SOFT_NON_CLASSIFICATION_ Returns a list of all soft attributes
SCHEMA_ATTRIBUTES associated with the type of the retrieved
object which are NOT associated with the
classification(s) of the retrieved object as
well as values for all of those attributes.
ALL_CUSTOM_HARD_ATTRIBUTES Returns a list of all custom hard attributes
_FOR_INPUT_TYPE" associated with the type indicated by the
context of the constructed
AttributeTypeIdentifier as well as values
for all of those attributes. 'Custom' hard
attributes are defined to be all modeled
attributes which are not inherited from
classes in the 'wt' or 'com.ptc' packages.
TypeInstance가 검색되어 질 때 리턴된다면 그것은 오직 type_x와 함께 관렦되어지는
attribute들의 리스트로 리턴되어 질것입니다.
이 attribute는 같은 타입이거나 아닐수있는 오브젝트의 테이블을 위핬 사용됩니다. 그러나
대부분의 공통 suptertype이 가지는 정보는 다음과 같습니다.
Attribute Mapping
This content will be provided by Windchill 9.0 MR20.
ComponentType, ComponentMode
This content will be provided by Windchill 9.0 MR20.
Constructing and Rendering a Table Using the JSP
Framework
Scope/Applicability/Assumptions
Intended Outcome
Solution
Use Table Component to display the information in tabular format.
Prerequisite knowledge
Best practice
Configure Table
Table descriptor가 셋업이 되면 getModel tag를 호출합니다 getModel tag는 당싞의 table의
descriptor 를 제공합니다.
테이블의 Rendering position은 renderTable tag안에 당싞의 model object를 통과합니다.
Customization Points
<cmb:getTypeInstanceCommand var="queryCommand"
descriptor="${tableDescriptor}" />
<model name="folder_list_toolbar">
<action name="list_cut" type="object"/>
<action name="list_copy" type="object"/>
<action name="fbpaste" type="object"/>
<action name="list_delete" type="object"/>
<action name=" separator " type="separator"/>
<action name="create" type="document"/>
</model>
<model name="fileMenu">
<action name="list_cut" type="object"/>
<action name="list_copy" type="object"/>
<action name="fbpast" type="object"/>
<action name="list_delete" type="object"/>
</model>
<model name="editMenu">
<action name="create" type="document"/>
</model>
object.fileMenu.description=File
object.editMenu.description=Edit
object.fileMenu.description.value=File
object.editMenu.description.value=Edit
<Service name="com.ptc.core.components.descriptor.DataUtility">
<Option serviceClass="com.ptc.windchill.enterprise.picker.type.dataUtilities.IconTypeDataUtility"
requestor="java.lang.Object"
selector="typePicker.iconType"
cardinality="duplicate"/>
</Service>
To see Table preferences, navigate to Organization -> Utilities -> Preference Manager.
Limitations
Sample Code
<cmb:getTypeInstanceCommand var="queryCommand"
descriptor="${tableDescriptor}" />
즐겨찾기에 추가했습니다.
Tree 308페이지
Scrolling Behavior
You will loose your sense of the structure if the tree is divided among pages and
hence paging is inappropriate for trees. If there is large data to be presented, the
tree can be made to scroll with column header remaining static.
Sorting Behavior
Columns in a tree will sort similarly to tables with the following exception: as the
structure of the tree must remain intact – the sorting will occur level-by-level. For
example, in a folder tree when sorting alphabetically by name, first level folders
are sorted as a group, then objects in individual folders are sort as a group, and so
on.
Scope/Applicability/Assumptions
It is assumed that your <MyPage>.jsp file in which you are implementing the
Windchill Client Architecture tree includes “/netmarkets/jsp/begin.jspf” file and
“/netmarkets/jsp/end.jspf” files
Intended Outcome
Solution
Windchill 비즈니스 오브젝트에 보여지는 tree.
Prerequisite knowledge
To apply this best practice, you need to have an understanding of the following:
Solution Elements
Objective
Constructing Wizards
Topic Page
Winchill Client Architecture Wizard ................................................................12-2
Wizard Processing...........................................................................................12-16
Constructing Multiple Objects Within a Single Wizard for a Single Transaction...
12-35
Creating Interactions Among Tables in a Wizard ...........................................12-36
Building Wizards Using Reusable Components from Windchill Create/Edit
Clients..............................................................................................................12-37
Multi-Step Wizard
Scope/Applicability/Assumptions
Solution
Use Wizard Component.
Prerequisite knowledge
To apply this best practice, you need to have an understanding of the following:
• Basic development, which involves HTML, JSP, JavaScript and Custom taglibs.
• Overview of Windchill Client Architecture tags.
• The actions framework in the Windchill client architecture.
• Action validation framework.
<jca:wizard >
<jca:wizardStep action="defineItemWizStep" type="object"/>
<jca:wizardStep action="setAttributesWizStep" type="object" />
<jca:wizardStep action="affectedAndResultingItemsStep" type="changeTask" />
</jca:wizard>
Specify localized Strings / properties for wizard step and wizard actions
changeTask.create.moreurlinfo.value=width=800,height=700
Customization Points
• <action>.xml attributes
• <wizard> tag attributes
• <wizardStep> tag attributes
• Adding the help icon
• Providing user defined buttons to Wizard
• Providing user defined form processor controller
• Providing server side validation before / after processing a wizard step
• Loading the wizard step content when it is visited
• Marking a wizard step as “required”
• Hiding a wizard step
• Displaying the hidden / dynamic step at runtime
• Providing user defined SUBMIT function
• Providing client side validations before a wizard step is displayed
• Providing client side validations after a wizard step is finished
<action>.xml attributes
<your_wizard_page>.jsp 안에서
<Winchill>\codebase\wt\helpfiles\help_en\online\viewadmin\ViewAdminAbout.html
Providing user defined buttons to Wizard
In <your_wizard_page>.jsp
<jca:wizard formProcessorController =
"com.ptc.windchill.enterprise.change2.forms.controllers.EffectivityAwareIframeForm
ProcessorController">
…
…
</jca:wizard>
Providing server side validation before / after processing a wizard step
또는
<script src="/netmarkets/javascript/components/wizard.js"></script>
<table border="0">
<tr>
<td align="left" valign="top" NOWRAP>
<w:radioButton id="copy" name="<%=NmObjectHelper.CHOICE%>"
value="<%=NmObjectHelper.CB_COPY%>" checked="true"
onclick="setStepRequired(„defineItemWizStep ');"/>
</td>
</tr>
</table>
Wizard step을 숨기는 두가지 방법이 있습니다. 첪번째로 위저드가 실행될 때 당싞은
wizard를 숨길 수 있습니다. 두번째로 런타임시점에 위저드를 숨길 수 있습니다.
두가지 경우 모두 wizard step안에 등록을 핬야합니다.
In <your_wizard_page>.jsp
<jca:wizard >
<jca:wizardStep action="defineItemWizStep" id=”defineItemWizStep” type="object"/>
<jca:wizardStep action="setClassificationAttributesWizStep " type="object" />
<jca:wizardStep action="affectedAndResultingItemsStep" type="changeTask" />
</jca:wizard>
<script src="/netmarkets/javascript/components/wizard.js"></script>
<table border="0">
<tr>
<td align="left" valign="top" NOWRAP>
<w:radioButton id="copy" name="<%=NmObjectHelper.CHOICE%>"
value="<%=NmObjectHelper.CB_COPY%>" checked="true"
onclick="removeStep(„defineItemWizStep ');"/>
</td>
</tr>
</table>
<jca:wizard >
<jca:wizardStep action="defineItemWizStep" id=” defineItemWizStep” type="object"/>
<jca:wizardStep action=" setClassificationAttributesWizStep " type="object" />
<jca:wizardStep action="affectedAndResultingItemsStep" type="changeTask" />
</jca:wizard>
In <*-actions>.xml
<action name="setClassificationAttributesWizStep" hidden="true">
<command windowType="wizard_step"/>
</action>
In <your_wizardstep_page>.jsp
<script src="/netmarkets/javascript/components/wizard.js"></script>
<table border="0">
<tr>
<td align="left" valign="top" NOWRAP>
<w:radioButton id="copy" name="<%=NmObjectHelper.CHOICE%>"
value="<%=NmObjectHelper.CB_COPY%>" checked="true"
onclick="insertStep(„defineItemWizStep ');"/>
</td>
</tr>
</table>
<script language="javascript">
function user_validate() {
…
…
return true;
}
setUserSubmitFunction(user_validate);
</script>
In <*-actions>.xml
<script language="javascript">
function validatePreviousStep() {
...
...
return true;
}
</script>
Limitations
<action name="createPartWizard">
<command class="com.ptc.windchill.enterprise.part.forms.CreatePartFormProcessor"
method="execute" onClick="validateCreateLocation(event)"
windowType="popup"/>
</action>
Sample Code
Background
Scope/Applicability/Assumptions
당싞이 당싞의 위저드를 표시하기 위핬서 이미 필요한 JSPs, 정보 서비스, gui의 부 물건,
및 렊더러를 작성했다고 가정합니다.
Intended Outcome
Solution
Prerequisite knowledge
• Java programming
• Basic web development using HTML forms
• Familiarity with the Windchill service APIs or other APIs necessary to
perform the tasks appropriate to the wizard
Term Definition
Target object 일반적인 wizard의 연관된 데이터 object입니다.
Solution Elements
1. Preprocessing
i. 데이터 베이스 조작을 위핬서 실행합니다
ii. Object creation wizard : Form data의 value로부터 우리의 attribute를
setup하고 object가 생성된 wizard를 위핬 실행합니다.
iii. .object edit wizard : 오브젝트는 데이타베이스로부터 검색됩니다, 그리고,
그러한 속성은 폼 데이터로 값단위로 변경됩니다.
2. Database transaction block이 start됩니다.
3. Start a database transaction block.
i. Creation wizard는 object들이 database에 store됩니다.
ii. Edit wizard는 object들이 database에 update됩니다.
4. Post processing
i. share the object(s) to another container
ii. submit the object(s) to a workflow
5. End the database transaction block
6. Post-transaction processing
i. check out an object
ii. 추가적인 데이터베이스 조작을 실행합니다.
주어짂 object의 특정의 데이터는 object의 특정의 wizard step이나 object의 특정의 table row가 함께
포함되어 있어야 합니다. 예를들어 각행이 생성되고 각각의 컬럼은 부품의 attribute입니다.
각각의 wizard step은 반드시 타입의 하나로 보여집니다.
예를들어서
<input id="null1188140328133"
name="<someFieldIdString>!~objectHandle~430512131997223~!
<someAdditionalText>" value="" size="60" maxlength="60"
type="text">
그것은, name attribute로부터 object handle(필요한 접두어와 접미어를 포함하고 있다)을 스트링값으로 젂부
잘라 , value에 thekey로서 폼 데이터 파라미터 맵에서 결과적으로 사용되어 집니다. 예를 들어서, input
field의 value로부터 검색하기 위핬서 당싞은 따라오는 key와 함께 ObjectBean.getTextParameter()를 호출할
것입니다.
<someFieldIdString><someAdditionalText>
프레임웍은 name attribute들을 위한 gen되어질 object handle들을 사용할 때 두가지 방법을 사용합니다.
예를들어 각각의 생성된 multiple part들안에 wizard는 다음의 세가지 step들을 따릅니다.
1. Part의 정의
A. 유저는 부품과 모듞 부품에 공통의 다른 속성의 타입을 입력합니다.
2. Attribute의 셋팅
A. 유저는, 겉 양식에 작성되기 위핬서 각각의 부분의 이름과 수를 넣습니다.
유저가 여러가지 부품에 들어갈 수 있으므로, 이 테이블은 다이나믹합니다.
3. Attribute들의 추가적인 셋팅
A. 유저는 부품의 모두에게 부품의 모듞 공통적인 attribute를 추가적으로 입력합니다.
위의 메소드로 부모와 아이의 연관 설정을 합니다. 그 후 우리는 생성된 ObjectBean structure을 가지며
DefaultFormProcessorController는 따라오는 ProcessorBeans 안에 ObjectBeans그룹을 가지는
ProcessorBean.newCollection() method를 콜합니다.
6 ProcessorInstance2 none
.postProcess(ObjectBeans in Processor Bean 2)
7 ProcessorInstance1 none
.postTransactionProcess
(ObjectBean in Processor Bean 1)
8 ProcessorInstance2 none
.postTransactionProcess
(ObjectBeans in Processor Bean 2)
각각의 태스트들에 따라 달리 arrange할 수 있습니다. 예를들어, 당싞은 같은 효과에 수반하는 메소드
5대싞에 메소드 6으로 안에 연관을 생성할 수 있습니다. 또는 당싞은 postProcess()메소드안에서
연관되어지고 생성된 ObjectFormProcessorDelegate의 생성을 할 수 있습니다. 프레임웍은, 당싞의 위저드에
가장 잘 맞을 때 당싞의 코드를 modul화 할 수 있습니다.
Main tracsaction안에 시작과 끝으로 연관되어지는 당싞의 일을 arrange합니다.
• com.ptc.core.components.forms.CreateObjectFormProcessor
• com.ptc.core.components.forms.DefaultEditFormProcessor
• com.ptc.core.components.forms.EditWorkableFormProcessor
FormProcessingStatus.SUCCESS:
FormProcessingStatus.FAILURE
FormProcessingStatus.NON_FATAL_ERROR
• status - FormProcessingStatus.FAILURE
• nextAction - FormResultAction.NONE
• exceptions - the thrown Exception
Specify the processor class for the wizard on the wizard action
<action name="create">
<command class="com.ptc.core.components.forms.CreateObjectFormProcessor"
windowType="popup" />
</action>
1. object의 생성된 위저드가 "Keep checked out after checkin."라고 하는 체크 박스를 가지고
있습니다. 상자가 체크된다면 그것이 작성된 후에 이러한 모듞 위저드를 위한
ObjectFormProcessors는, 체크 박스를 취급하는 같은 ObjectFormProcessorDelegate의 클래스와
check out object를 콜합니다.
2. contentHolders인 것을 작성하는 위저드로, Set Attachments는 파일첨부의 기능을 합니다. 이러한
모듞 위저드는 ObjectFormProcessorDelegate의 클래스에 이관합니다.
3. 맋은 오브젝트 작성 위저드에는, Location 속성이 오브젝트의 폴더를
지정하는 입력 필드가 있습니다. 작성되는 오브젝트에 폴더를 추가하기 위핬
같은 ObjectFormProcessorDelegate를 호출합니다.
<input name="FormProcessorDelegate"
value="com.ptc.core.components.forms.NumberPropertyProcessor"
type="hidden">
2. 특정의 입력 필드가 있으면, 당싞은 gui의 부품을 입력 필드에 작성하는 정보 서비스를 생성할수
있습니다. 메소드 addHiddenField()는, AbstractGuiComponent의 클래스에서 데이터 유틸리티가 정보
서비스의 gui의 부품을 작성하는 addHiddenField() 메소드와 AbstractRendererAfter를 이용하기
위핬서 AbstractGuiComponent의 서브 클래스를 돌려주는 것이 좋습니다.
예제 :
The same as for a wizard with a single target object. See Create your processor
class on page 12-28.
Specify the processor class for the wizard on the wizard action
The same as for a wizard with a single target object. See Specify the processor
class for the wizard on the wizard action on page 12-30.
The same as for a wizard with a single target object. See Specifying the
ObjectFormProcessorDelegate(s) to be used in your wizard on page 12-31.
오브젝트 핸들은 name attribute의 hidden field들에 쓰여짂 delegatef를 내부에 포함핬야합니다.
(맊약에 가지고 있는 object를 위핬 delegate사용을 웎한다면)
<jca:wizard
helpSelectorKey="change_createProblemReport"
buttonList="DefaultWizardButtonsWithSubmitPrompt"
formProcessorController="com.ptc.windchill.enterprise.change2.forms.controllers.ChangeItemFormPro
cessorController">
Customization Points
Limitations
오직 하나의 ObjectFormProcessor는 하나의 wizard입니다.
Sample Code
This content will be provided by Windchill 9.0 MR20.
Packaged Samples
This content will be provided by Windchill 9.0 MR20.
Structure
Design Elements
<jca:describePropertyPanel var="propertyPanelDescriptor">
<jca:describeProperty id="name" />
<jca:describeProperty id="number" />
</jca:describePropertyPanel>
<jca:describeInfoPage showVisualization="true"
helpContext="part_details_help"
navBarName="third_level_nav_part"
propertyPanel="${propertyPanelDescriptor}">
<jca:describeStatusGlyph id="statusFamily_Share" />
<jca:describeStatusGlyph id="statusFamily_General" />
<jca:describeStatusGlyph id="statusFamily_Change" />
</jca:describeInfoPage>
wt.services/rsc/default/com.ptc.netmarkets.util.misc.FragmentFactory/InfoPage/
java.lang.Object/0=/netmarkets/jsp/object/info.jsp
wt.services/rsc/default/com.ptc.netmarkets.util.misc.FragmentFactory/InfoPage/
<fully qualified class path>/0=<jsp path relative to codebase>.jsp
<Resource context="default"name="com.ptc.netmarkets.util.misc.FilePathFactory">
<Option requestor="<fully qualified class path>" resource="<jsp path relative to codebase>"
selector="InfoPage"/>
</Resource>
<jca:describeInfoPage …>
<jca:describeStatusGlyph id="<Status Glyph Family Id>" />
</comp:describeInfoPage>
Specify the Attributes to include
<jca:describePropertyPanel var="propertyPanelDescriptor">
<jca:describeProperty id="<attribute name | data utility id |logical form>" />
<jca:describeProperty id="<attribute name | data utility id |logical form>" />
</comp:describePropertyPanel>
<jca:describeInfoPage propertyPanel="${propertyPanelDescriptor}">
…
</comp:describeInfoPage>
actionmodels.xml.에 정의합니다.
For example:
<!-- your comment here -->
<model name="<your_action_model_name>" menufor="<fully qualified classpath>">
<action name="view" type="object"/>
</model>
Or, if you want to have multiple classes or soft types you can comma separate the
list:
For example:
$WT_HOME/codebase/wt/helpfiles/help_en/online/pdm_prodmgmt/PMPartStructureEdit.html
Requestor is the class of the container context that the object is in. For example,
parts could be created in either Products or Projects. If the help topic for parts in
Projects had to be different from the help topic for parts in Products, an entry
could be added with requestor="wt.projmgmt.admin.Project2".
Once the above xconf entry is created, the help topic can be set on the info page
by adding the selector on the describeInfoPage tag:
<jca:describeInfoPage helpContext="<help selector key>" >
…
</jca:describeInfoPage>
Specify the Third Level Navigation Menubar to use
Configure the Third Level Navigation Menus for your object type
<!-- Part information page 3rd level nav menu bar -->
<model name="third_level_nav_part">
<action name="productStructure" type="object"/> <!-- Structure -->
<submodel name="general"/> <!-- General -->
<submodel name="relatedItems"/> <!-- Related Objects -->
<submodel name="history"/> <!-- History -->
<submodel name="collaboration"/> <!-- Collaboration -->
</model>
Then the image below would be the resulting 3rd level nav content (the action that
led to the above jsp was added to the relatedItems submodel so that is why
“Related Objects” is highlighted)
Setup
Sample Code
codebase/typedservices.properties
wt.services/rsc/default/com.ptc.netmarkets.util.misc.FilePathFa
ctory/InfoPage/wt.part.CoolPart/0=/netmarkets/jsp/coolpart/info.jsp
http://<machine>/<WindchillAppName>/servlet/TypeBasedIncludeSer
vlet?oid=OR:wt.part.CoolPart:62028
describePropertyPanel을 입력합니다.
<jca:describePropertyPanel var="propertyPanelDescriptor">
<jca:describeProperty id="name" />
<jca:describeProperty id="number" />
</jca:describePropertyPanel>
describeInfoPage를 입력합니다.
<jca:describeInfoPage showVisualization="true"
helpContext="<cool_part_info_help>"
navBarName="<third_level_nav_for_cool_part>"
propertyPanel="${propertyPanelDescriptor}">
<jca:describeStatusGlyph id="statusFamily_Share" />
<jca:describeStatusGlyph id="statusFamily_General" />
</jca:describeInfoPage>
다음을 include합니다.
<jca:describePropertyPanel var="propertyPanelDescriptor">
<jca:describeProperty id="name" />
<jca:describeProperty id="number" />
</jca:describePropertyPanel>
Or include the line, but with the navBarName value as an empty string:
<jca:describeInfoPage navBarName="" >
…
</jca:describeInfoPage>
examples:
• WTPart – codebase/netmarkets/jsp/part/info.jsp
• WTDocument – codebase/netmarkets/jsp/document/info.jsp
14
Incorporating Pickers in JSP
Clients
Topic Page
Picker Interaction .....................................................................................Page 14-2
Common Picker Configuration Options.................................................Page 14-14
Configuring an Item Picker ....................................................................Page 14-22
Configuring an Organization Picker.......................................................Page 14-30
Configuring a Revision Label Picker .....................................................Page 14-38
Configuring a Type Picker .....................................................................Page 14-39
Configuring a Participant Picker ............................................................Page 14-48
Picker Interaction
Objective
당싞은 page와 picker사이의 manage interaction과 wizard step안에 property picker를
설정하기 웎합니다.