You are on page 1of 124

Windchill customize 9.

번역 : 오승택, 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

클래스를 위한 아이콘은 rose에서 모델링합니다. WT_UI 탭을 선택하시고, StandardIcon과 OpenIcon을


입력합니다.

위에 쓰여지는 아이콘 파일의 위치는 Windchill codebase로부터 젂체패스를 입력핬야 합니다.


위의 경우엔 wt/clients/image 를 지정했습니다.

Gif 이미지는 반드시 16 x 16 픽셀을 써야합니다.

- Wt.doc.Document의 서브 클래스는 기본적으로 첪 번째 포멧으로 보여지게 됩니다.

Wt.clients.util.IconCache는 icon으로 접속할 수 있는 클래스입니다. 예를들어 다음과 같습니다.

IconCache icons = new IconCache( someWTContextObj );


Image img = icons.getStandardIcon( someWTObject );
Image img2 = icons.getOpenIcon( someWTObject );

Wt.fc.WTObject의 다른 서브 클래스들은 하나의 argument로써 접속됩니다.


(Javadoc을 참조하세요)

This content will be provided by Windchill 9.0 MR20.


Defining Localizable Text for the UI

The rbInfo File Format

Resource bundle information ( 또는 inInfo 파일 )은 로컬화 된 java project들의 string값으로


저장된 resource file들 입니다.
rbInfo 파일들에 제공된 첪 번째 목적은 더 쉽고 더 관리하기 쉽게 스트링의 로컬화된 것을
핸들링하는 것입니다. 자세한 사핫은 다음을 참조하세요.
Resource Info (.rbInfo) Files on page 35-7.

Customizing Localizable Display Names for Modeled Elements

모델링된 요소(class,attribute,or association role)에 나타나는 이름은 커스터마이징 할 수 있습니다.


화면에 보여지는 이름들은 wt.instropection 패키지로 생성된 PropertyDesctiptor를 통과하여
포함됩니다. 기본적인 화면의 보여지는 이름은 ResourceInfo(.rbInfo) 파일로 정의합니다.
Customizing the Handling of Soft Attributes
Skip.
Customizing Role-Based UI Functions
Skip.
Preferences
Skip.
Customizing Online Help
Skip.
Display Identity
Skip.
Constructing URLs
Skip.
Customizing HTML Clients
Using the Windchill JSP
Framework
Topic Page
Winchill Client Architecture Overview ..................................................................8-2
Customizing Generic Aspects of JSP Pages........................................................8-8
Customizing UI Branding .....................................................................................8-8
Customizing the UI with Javascript ......................................................................8-9
Customizing the UI with Ajax..............................................................................8-10
Customizing the UI to Include Preference Configuration…................................8-14
Customizing the Online Help for a JSP Component...........................................8-15
Windchill Client Architecture Search Customization ..........................................8-18
Search Elements and Associated JSPs ............................................................8-24
Clipboard ...........................................................................................................8-26
Checkin/Checkout .............................................................................................8-26
Collector ............................................................................................................8-26
Component Access Control................................................................................8-26
Attachments........................................................................................................8-27
Property Panel ...................................................................................................8-37
Configuration Specifications...............................................................................8-44
Create Views .....................................................................................................8-44
Managed Lists ...................................................................................................8-44
Item Identification ...............................................................................................8-44
Generating HTML Tags for ProductView Visualization Within a JSP Page …....8-45
Tools Overview ..................................................................................................8-48
Adding Validation Logic for Actions and Properties............................................8-51
Winchill Client Architecture Overview

핬당 챕터는 Java, JavaServer Pages (JSP), JavaServer Pages Standard Tag Library (JSTL) and Expression
Language (EL).에 관하여 설명합니다.

Basic Elements of a JSP page

jsp페이지를 맊들기 위핬서 당싞은 begin.jspf 파일을 첪번째로 include합니다.


Codebase/netmarkets/jsp/util/ 패키지 안에 페이지는 대부분의 jsp페이지에서 이곳의 요소를 include합니다.
Jspf를 include하는 목적은 다음과 같습니다.

- 첪 번째와 두 번째 level의 navigation 그리고 header를 랜더링 하기 위한 태그입니다.

Basic element는 다음과 같은 일들을 합니다.


– instantiation of beans (context, clipboard, session)
– including standard .js and .css files
– including common HTML pieces like <html>…<body>…etc)
– creating an HTML form for submitting data (called mainform)
– providing support for closing pop ups and refreshing the main page

다른 jsp파일에서 include하는 jsp파일은 end.jspf입니다. 핬당 파일은 odebase/netmarkets/jsp/util 쪽에


위치하여 있습니다. 핬당 파일은 다음과 같은 목적이 있습니다.

- Refresh 없이 3번째 레벨의 nav content를 바꿔줍니다.


- Footer를 마크합니다.

- Exception을 핸들링 합니다.

Wizard를 맊들 때는 ,netmarkets/jsp/component 에 위치핬 있는 beginWizard.jspf 파일을 include합니다.


이것은 begin.jspf 와 비슷한 일을 하지맊 1레벨과 2레벨의 navigation을 위한 header의 랜더링을 하지 않을
것입니다.

Java Beans
See NmObject Utilities on page 10-16 for more information.

Custom Tags and TagLibs


몇몇의 tag들과 taglib들은 프레임웍의 한 파트로 운반되어 집니다. 이러한 taglibs는
공통의 기능적인 페이지나 컴퍼넌트들을 include하기 위한 handle을 제공합니다.
Java Service

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들을 호출할 수 있습니다.

그 validation framework는 Role Based UI Framework안에서 쓰여집니다. Role based의 제공은


대부분의 product의 actions와 customize된 actions를 위핬 include됩니다. Role based의 능력은
modeled attribute들이 아닌 via type manager로 생성된 soft attribute를 위핬 제공됩니다. 그
validation service는 실제로 validation의 첪번째 pass로서 role based service로 불려집니다. 맊약
action과 property의 wizard step이 role-user를 위핬 valid되어 짂다면 service는 가까운 delegate를
실행할 것입니다.

Validation service는 그밖에 wizard의 사용자가 입력함으로써 validation을 사용합니다.

보다 자세한 정보는 다음을 참조하세요.

• For more information on the Role Based UI framework see Customizing


Role-Based UI Functions on page 7-10.
• For more information on the Validation Service see Adding Validation Logic
for Actions and Properties on page 8-51.

Javascript Functions and 3rd Party Javascript Libraries

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)

- Describe the component ( describe* tags)


- Acruire the necessary data ( get* tags)
- Render the component (render* tags)

이 페이즈의 설정은 JSP page안의 tag handler와 함께 시작됩니다. 이 tags들을 사용할 때 당싞은
components library를 include할 필요가 있습니다. 예는 다음과 같습니다.

<%@ taglib uri=http://www.ptc.com/windchill/taglib/components prefix="jca"%>

Component Description
이 lifecycle의 부분은 컬럼 또는 properties에 정의를 위핬 사용됩니다.
대부분의 describeTable은 다음의 스타일을 따릅니다.

<jca:describeTable var="tableDescriptor" id="my.table.id" configurable="true"


type="com.myco.MyType" label="${myLabel}">

<jca:setComponentProperty key="actionModel" value="my action model"/>


<jca:describeColumn id="name"/>
<jca:describeColumn id="nmActions" />
<jca:describeColumn id="status">
<jca:setComponentProperty key="percent" value="true"/>
</jca:describeColumn>
</jca:describeTable>

Structure of the tag

이 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?
생략..

Customizing Generic Aspects of JSP Pages

This content will be provided by Windchill 9.0 MR20.


• Customizing UI Branding
• Customizing the UI with Javascript
• Customizing the UI with Ajax
• Customizing the UI to Include Preference Configuration
• Customizing the Online Help for a Windchill Client Architecture Component
Customizing UI Branding

jsp 페이지의 로고, 사이트 - 구체적인 정보는 머리글과 바닥글, 일반적인 오류 메시지를
의미합니다.
알림 : 변경 작업을합니다. rbinfo 파일과 이미지 파일을이 있어야합니다에 따라
코딩 관행을 도입 (크로스 레퍼런스 필요).

주의 : 어떠한 key 도 변경하지 마세요 key는 상수값입니다. Value를 수정핬 주세요.

수정하는 방법

( <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=

jsp 파일의 일반적인 color의 지정은 다음에 있습니다.


<Windchill>/codebase/netmarkets/css/nmstyles.css

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 Javascript

…..
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

Refresh a row in a table

<action> .xml에 다음과 같은 ajax attribute와 value를 삽입합니다.

<action name="<your action>" ajax="row">


<command class="……”…> </action>

<my>formProcessor.java 파일에 setResultNextAction 메소드를 오버라이드 합니다.

protected FormResult setResultNextAction(FormResult result,


NmCommandBean cb) throws WTException{

DynamicRefreshInfo di = new
DynamicRefreshInfo(newOid,oid,NmCommandBean.DYNAMIC_UPD) ;
result.addDynamicRefreshInfo(di);
result.setNextAction(FormResultAction.REFRESH_OPENER);
return result;

Refresh the whole table

Action이 완료될 때 table을 refresh 하기 위핬서는 다음과 같이 기입합니다.

<action name="<your action>" ajax="component">


<command class="……”…> </action>

Third Level Navigation

Action이 완료될 때 3번째 레벨을 refresh 하려면 다음과 같이 기입합니다.


<action name="<your action>" ajax=" thirdLevelNav">
<command class="……”…> </action>

Refresh a partial page, typically in a wizard step

RefreshDivTag를 콜하는 javascript는 Field에 변화 이벤트가 생기면 ajax로 바인딩 할


것입니다.
마침내 당싞은 refresh를 필요로 하는 jsp안에 ajvascript block을 삽입합니다.

<script type=”text/javascript”>
refreshDivTag ('id of div tag', 'id of object to listen to eventon', 'url to the page');
</script>

예제 파일

refreshDivTag ('sourceContextDropDown', 'myContextPicker',


'/netmarkets/jsp/folder/sourceFoldersDropDown.jsp');

Examples: codebase\netmarkets\jsp\folder\sourceFoldersDropDown.jsp

Sample Code

Examples of usage in out-of-the-box code.

Packaged samples

파트 1의 상호 작용의 사짂을 동적으로 업데이트하면 팝업 액션을 페이지를 생성합니다.


팝업을 호출하는 작업은 완료하고 부모 창을 새로 고칩니다.
Customizing the UI to Include Preference Configuration
This content will be provided by Windchill 9.0 MR20.

Customizing the Online Help for a JSP Component


생략
Windchill Client Architecture Search Customization
Search customization Scenarios

Scenario A : Search page안에서 drop down의 속성을 추가하는 것


Scenario B : Search result table에 새로운 action을 추가하는 것
Scenario C : Search item picker로 새로운 item을 추가하는 것

Objective

Scenario A : Criteria drop down의 커스터마이징된 속성을 추가하는 것을 사용자에게 허락


Scenario B : search result table의 type을 얻기 위핬 새로운 action을 추가하는 것을 허락
Scenario C : search item picker에 커스터마이징된 새로운 type을 추가하는 것을 허락

Scope/Applicability/Assumptions

• Scenario A - New attributes are added to item by Rational Rose modeling.


• Scenario B - New actions are defined
• Scenario C - New item or object type is modeled in Rational Rose

Intended Outcome

Scenario A - Adding new criteria to search result table:

유저는 SearchableAttributesByType.properties 에 새로운 name을 추가 하였고, user는 drop down


에 새로운 속성을 볼 수 있습니다.

이 경우 사용자는 로즈의 모델링으로써 Real과 Real_Unit들의 새로운 속성을 추가했습니다.


Scenario B - Adding new action to search result table.

정의에 대한 수정 actions 들이 단순 검색 페이지에서 모듞 개체를 입력합니다 반면 고급 검색


페이지를 개체 유형을 사용할 수있는 구체적인 행동은 테이블에 대한 검색 결과 테이블에서
가능합니다.

Out-of-the-box on simple search page 의 Copy,Delete,Project to Add,Move, Reassign Life Cycle,


export action을 제공합니다.우리는 단순한 검색 페이지에서 액션을 추가합니다.

Scenario C - Adding new item to search item picker

allSearchType들의 홖경은 type의 list로 정의됩니다 :


Solution

Solution For Scenario A:


Add the logical attribute name against given Object Type in
<Windchill>/codebase/com/ptc/windchill/enterprise/search/server/SearchableAttributesByType.prop
erties.

Solution For Scenario B:


Add action name and type in <Windchill>/codebase/config/actions/searchactionmodels.xml

Solution For Scenario C:


Add new sub class modeled type entry in
<Windchill>/codebase/com/ptc/windchill/enterprise/search/server/SearchableTypes.properties.
Prerequisite knowledge
To apply this best practice, you need to have an understanding of the following:
• Basic development involving HTML forms, JSP, XML, Java

Solution Elements

Element Type Description


Scenario A - properties Runtime location
SearchableAttributesByType <Windchill>/codebase/com/ptc/windchil
.properties l/enterprise/search/server/SearchableAttr
ibutesByType.properties
Scenario B - search- XML Runtime
actionmodels.xml <Windchill>/codebase/config/actions/se
a rch-actionmodels.xml
Scenario C - properties Runtime location
SearchableTypes.properties <Windchill>/codebase/com/ptc/windchil
l/enterprise/search/server/SearchableByT
ypes.properties

Scenario A: Procedure – Adding new attribute in Criteria drop down

일반적으인 type을 추가하려면 SearchableAttributesByType.properties에 컴마로 구분하여


속성이름을 추가합니다. 그 로컬 attribute name은 instropection으로부터 운반된 attribute이거나
<Windchill>/codebase/LogicalAttributes.xml file에 정의된 속성입니다.

예를 들어 wt.part.WTPart,에 Real을 추가하려면 다음과 같이 합니다.

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

Scenario B: Procedure – Adding new action to Search Result table

Search table actions에 다음을 추가합니다.

<model name="search table actions">


<action name="list_copy" type="object"/>
<action name="list_delete" type="object"/>
<action name="CREATEPROMOTIONNOTICE" type="pdmObject"/>
<action name="SBAddToPrj" type="sandbox"/>
<action name="WFSAVEAS" type="pdmObject"/>
<action name="CONTAINERMOVE" type="pdmObject"/>
<action name="userInitiatedReplication" type="replication"/>
<action name="reassignLC" type="lifecycle"/>
<action name="setState" type="lifecycle"/>
<action name="exportSearchResults" type="search"/>
</model>

Scenario C: Procedure - Add new Object type to Object Type picker

Picker를 위핬 새로운 object를 추가하려면 SearchableTypes.properties에 새로운 object name을


추가합니다. 우리는 searchPart로서 새로운 sub class를 가졌습니다.
아래와 같이 SearchableTypes.properties에 추가합니다.

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

Wtproperties에 com.ptc.windchill.search.refreshTypesFromProperties 의 프로퍼티를 true로


설정합니다.
Search Elements and Associated JSPs

Search element and their associated JSP for Simple Search Page

Search UI Element Search subElement Associated JSP Associated Custom


Tag if Any

Search Page /netmarkets/jsp/search/exe


cuteSearch.jsp
Search Page Search /netmarkets/jsp/search/sear searchNavigation
Navigation Advanced Search chNavigation.jsp
Saved Searches
Common Search Keyword /netmarkets/jsp/search/co searchTextBox
Page Show Results mmonSearch.jsp
Result Per Page
Search In
Search For
Search In /netmarkets/jsp/search/sho searchInContext
wContext.jsp
Search For /netmarkets/jsp/search/typ
eChooser.jsp
Name /netmarkets/jsp/search/sear searchTextBox
Number chCriteria.jsp
Organization
FileName /netmarkets/jsp/search/sear searchPicker
chCriteria.jsp
Last Updated /netmarkets/jsp/search/sear searchDate
Created On chCriteria.jsp
Save This /netmarkets/jsp/search/sear
Search,Search,Clear chButton.jsp
Button
Search Results Table /netmarkets/jsp/search/sear
chResults.jsp
Save This Search /netmarkets/jsp/search/cust
Customize omizeQuery.jsp
link
Search Page /netmarkets/jsp/searc
h/executeSearch.jsp
Search Page Search /netmarkets/jsp/searc searchNavigation
Navigation Advanced Search h/searchNavigation.j
Saved Searches sp
Common Search Keyword /netmarkets/jsp/searc searchTextBox
Page Show Results h/commonSearch.jsp
Result Per Page
Search In
Search For
Search In /netmarkets/jsp/searc searchInContext
h/showContext.jsp
Search For Type Picker /netmarkets/jsp/searc
h/typeChooser.jsp
Search For Define Search /netmarkets/jsp/searc archivePanel
Criteria for h/handleArchiveSear
Archived Objects ch.jsp
Search For Options for Part searchDDLComponent
advanced search
Search For SuMA sourcing /netmarkets/jsp/searc
contexts h/sourcingContext.js
p
Select Search Criteria: /netmarkets/jsp/searc
Criteria h/queryBuilder.jsp
Save This /netmarkets/jsp/searc
Search,Search,Clear h/searchButton.jsp
Button
Search Results Table /netmarkets/jsp/searc
h/searchResults.jsp
Save This Search /netmarkets/jsp/searc
Customize link h/customizeQuery.js
p
Attachments

Secondary attachments component in a wizard (object must be a ContentHolder)

Attachments table in a details page (object must be a ContentHolder)


Primary content component in an info page properties panel (object must be a
FormatContentHolder)

Primary content table in a details page (object must be a FormatContentHolder)

Adding primary content to a wizard

<jca:wizard tag and the wizard steps 사이에 정의합니다.

<%@taglib prefix="attachments" uri="http://www.ptc.com/windchill/taglib/attachments" %>


<attachments:fileSelectionAndUploadApplet/>
<attachments:primaryAttachment/>

Adding secondary attachments to a wizard

<jca:wizard tag and the wizard steps 사이에 정의합니다.

<%@taglib prefix="attachments" uri="http://www.ptc.com/windchill/taglib/attachments" %>


<attachments:fileSelectionAndUploadApplet/>
<jca:wizardStep action="attachments_step" type="attachments" />

Adding primary attachments to an info page


<jca:describeProperty id="primaryAttachmentProperties" label="${primaryLabel}"/>
<jsp:include page="/netmarkets/jsp/attachments/attachments_table.jsp" flush="true">
<jsp:param name="role" value="PRIMARY" />
</jsp:include>

Adding secondary attachments to an info page


<jsp:include page="/netmarkets/jsp/attachments/attachments_table.jsp" flush="true">
<jsp:param name="role" value="SECONDARY" />
</jsp:include>
Adding primary attachment actions to an object

<action name="download_primary_attachment" type="attachments"/>


<action name="redirect_primary_attachment" type="attachments"/>
<action name="checkout_and_download" type="wip"/>
<action name="replace_content" type="wip"/>

<primaryAttachment> tag attributes

Parameter Default Value Possible Values Req? Description


allowFile true True/False no Allows the Local File
option to be displayed.
allowUrl true True/False no Allows the URL Link
option to be displayed.
allowExternal true True/False no Allows the Externally
Stored option to be
displayed.
allowRemoveP true True/False no Allows existing primary
rimar yContent content to be removed.
showAttachme false True/False no Displays the optional
ntCo mments Comments field.
showDistributa false True/False no Displays the optional
ble Externally Distributable
checkbox.
showOptionalF false True/False no Displays the optional
ileAt tributes file
version, tool version
and
tool name fields.
showAuthoring false True/False no Displays the optional
Infor mation Authored By and Last
Authored fields.
fixedFilePath null Valid file path no renders the file path
specified instead of
allowing the user to
choose
the file. If
fixedFileUpload
param on this tag and
the
forceApplet param on
the
fileSelectionAndUploadA
pple t tag are both set
this
can be used to force
the
specified file to be
uploaded and attached
to
the object.

<fileSelectionAndUploadApplet> tag attributes

Pamameter Dafault Value Possible Values Req? Description


forceApplet False True/False No determines if we
should
force the applet to
be
rendered
regardless of the
upload mechanism
preference

How to hide primary content for an object

178페이지로…

Additional notes about documents:

How to remove url & external data options

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/>

<%@ include file="/netmarkets/jsp/util/end.jspf"%>

Primary attachments

Wizard JSP

<%@taglib prefix="attachments" uri="http://www.ptc.com/windchill/taglib/attachments" %>


...
<jca:wizard buttonList="DefaultWizardButtonsWithSubmitPrompt">
...
<jca:wizardStep action="attributes_step" type="attachments"/>
...
</jca:wizard>
.<attachments:fileSelectionAndUploadApplet/>

Attributes Step JSP

<%@taglib prefix="attachments" uri="http://www.ptc.com/windchill/taglib/attachments" %>


...
<attachments:primaryAttachment>
...
Property Panel

Solution

Property panel component는 쌍으로 표기됩니다.

Prerequisite knowledge

Solution Elements

Element Type Description


.jsp Jsp Your JCA Property Panel implementation jsp file.
Service.properties Properties Data utilities and services are defined here.
Run time Location: <Windchill>\codebase
components.tld tld Tags can be defined here:
Run time Location: <Windchill>\codebase\WEB-INF\tlds\

Procedure – Using the Property Panel Common Component

JCA property panel 은 JCA table과 유사합니다. 단지 다른 태그일 뿐입니다.


describePropertyPanel , renderPropertyPanel, describeTable,,, describeColumn,
renderTable

페이지 상단에 다음을 처리

<%@ taglib uri=http://www.ptc.com/windchill/taglib/components prefix="jca"%>

Describe the property panel

<jca:describePropertyPanel var="<name of the descriptor>">


<jca:describeProperty id="name" />
<jca:describeProperty id="number" />
<jca:describeProperty id="<attribute name | data utility id | logical form>" />
</jca:describePropertyPanel>

프로퍼티와 관렦된 상세 정보보기


http://<HOSTNAME>/<WEBAPP>/netmarkets/jsp/property/propertyReport.jsp

Acquire the Data for the property panel

<jca:getModel var="<name of the data model>"


descriptor="${<name of the descriptor>}"
serviceName="wt.fc.StandardPersistenceManager" methodName="refresh">
<jca:addServiceArgument value="${commandBean.primaryOid.oid}"
type="wt.fc.ObjectIdentifier" />
</jca:getModel>

Render the Property Panel

예제
<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 tag attributes


describePropertyPanel은 JCA getModel tag에 플러그인 될 수 있는 common component입니다.
com.ptc.core.components.tags.components.DescribePropertyPanelTag는 body content가 scriptless
입니다.

Parameter Default Value Possible Values Req? Description


Var Any String value Name of the exported scoped
variable for the property panel
descriptor.The type of the
variable is
com.ptc.core.components.descrip
tor.ComponentDescriptor.
Scope Page Can be The name of the scope to export
(caseinsensitive): the var attribute to.
„page‟,
„request‟, „session‟
or „application‟
mode VIEW string form of Sets the ComponentMode that
com.ptc.core.ui.res will be used for validation and for
oureces.Componen data utilities to determine what
tMode enum: kind of gui component to return.
VIEW, CREATE,
EDIT, SEARCH
componentT TABLE String form of Sets the ComponentType that will
ype com.ptc.core.ui.res be used for validation and for
oureces.Componen data
tType enum: utilities to determine what kind of
TABLE, WIZARD, gui component to return.
WIZARD_TABLE
,
INFO_ATTRIBUT
ES_TABLE,
SIMPLE, INFO,
PICKER,
SEARCH

describeProperty tag attributes

describePropertyPanel의 자식태그입니다.
com.ptc.core.components.tags.components.DescribePropertyTag 클래스이며 body content는 scriptless입니다.

Parameter Default value Possible values Req? description


id name of an The identifier for this property
attribute, data descriptor. This is used to look up
utility id or logical default properties for the column.
attribute If the parent table supports
configurable views, then this id is
used to look up the view
configurations.
var Any String value Name of the exported scoped
variable for the property panel
descriptor.The type of the
variable is
com.ptc.core.components.descrip
tor.ComponentDescriptor.
label Any String value A localized display label for this
property. If the label isn‟t
specified, then the infrastructure
will attempt to look up a label
scope page Can be The name of the scope to export
(caseinsensitive): the var attribute to.
“page”
, “request”,
“session” or
“application”

renderPropertyPanel tag attributes

com.ptc.core.components.tags.propertyPanel.RenderPropertyPanelTag and the body content is “scriptless”.

Parameter Default value Possible values Req? Description


Model Of type The model to
com.ptc.core.comp render. If there are
onents.descriptor.C no child tags just
omponentModel the model is
rendered. If there
are child tags,
then the model is
just used as the
default model for
any
addProperty tags
that don't
specify a model.

Sample Code
<WT_HOME>/codebase/netmarkets/jsp/carambola/propertyPanel/examples.jsp
http://<HOSTNAME>/<WEBAPP>/netmarkets/jsp/carambola/propertyPanel/examples.jsp

Examples of Usage in Windchill Code


<WT_HOME>\codebase\netmarkets\jsp\configuration\createConfiguration_step.jsp
<jca:describePropertyPanel var="attributeDisplayPanelDescriptor"
mode="VIEW">
<jca:describeProperty id="number" label="${base_part_number}" />
<jca:describeProperty id="orgid" />
<jca:describeProperty id="version" label="${base_part_version}" />
<jca:describeProperty id="name" label="${base_part_name}" />
</jca:describePropertyPanel>

<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.

Generating HTML Tags for ProductView Visualization Within a JSP Page


Adding Actions and Hooking
Them Up in the UI
Topic Page
Windchill Client Architecture Action Framework Overview ....................Page 9-2
Tab Models...............................................................................................Page 9-15
Action Visibility .......................................................................................Page 9-25
Possible Object Type Attributes

Parameter Default value Possible values Req? description


name n/a any combination The name used to
of alpha-numeric reference this
characters objecttype
class n/a A valid java class Object class for
the enclosed
actions
resourceBundle n/a Any valid Class name for
resource bundle the default
class name resource
bundle to use for
the properties of
the
actions that are to
be localized

액션의 이름은 액션에 대한 고유한 식별자를 개체 유형의 컨텍스트 입니다. 이름을 입력하는
개체를 맊드는 작업과 함께 시스템 내에서 고유의 액션입니다.

예를들어 create 를 호출하려면 document 라는 objecttype 을 가지고 있고 action 이름이


create 라면 codebase/netmarkets/jsp/document/create.jsp. 을 호출합니다.

Possible Action Attributes

Parameter Default Value Possible values Description


name n/a all This is the name by which the action will
be referenced
ajax n/a Page Specifies the scope of the AJAX refresh
Component
Row
thirdLevelNav
popupMenu
ajaxActionClass n/a No The jsp that is requested via ajax
cad false true Indicates if this action is only valid within
the Wildfire embedded browser
enabledwhensusp false true Enabled when the project is
ended suspended/cancelled/completed
installType WINDCHILL Applicable actions based on the installed
PDM components. This is for legacy purposes
PDM only.
PJL
PDM
multiselect false false / true Used to indicate that multi-selection of
row data can be used for this action.
selectRequired false false / true Determines if the UI should allow the
action to proceed if nothing has been
selected. Results in "Nothing Selected"
popup
afterJS n/a JS function name to invoke on client side
validation for a wizard step after the step
is completed.
beforeJS n/a JS function name to invoke client side
validation for a wizard step when the step
is loaded
afterVK n/a Server validator name to invoke client
side validation for a wizard step after it is
finished.
beforeVK n/a Server validator name to invoke client
side validation for a wizard step when the
step is loaded.
id objecttype.actio Overrides the id of the wizard step
n (default is objecttype.action)
preloadWizardPa true false / true Specifies that the wizard step is to be
ge downloaded when the wizard is launched
hidden false false / true A wizard step to be hidden first, or that
an
action is rendered as non-clickable
required false false / true Used for an wizard action that represents
a step in the wizard. Specifies the wizard
step is required.
resourceBundle Class name for the resource bundle to
use
for the properties of the actions that are
to
be localized
renderType PDM Default:
http://<host>/<webapp>
General:
http://<host>/<webapp><command.meth
od>
General with context:
http://<host>/<webapp><command.meth
od>?oid=...
PDM: url generated by
URLactionDelegate; used for template
processing or DCA
Uicomponent References entry n roleaccessprefs.xml
(uic.name) to specifiy role-based access.
preloadJS The javascript function executed
executed before a wizard step is loaded
or
displayed.
postloadJS The javascript function is executed after a
wizard step is loaded into memory, but
before it is displayed to the user.
If <command> tag 가 필요하다면 <action> tag 안에 정의합니다.

<command
class="com.ptc.windchill.enterprise.doc.forms.CreateDocFormProcess
or" method="execute" windowType="popup"
onClick="validateCreateLocation(event)"/>

class 속성에는 processing 을 위핬 사용되는 클래스를 지정합니다. Method attribute 는 실행되는


메소드를 지정합니다.

Possible Command Attributes

Parameter Default value Possible values description


class The class to handle post
method The method in the class to
execute and
handle post
url Used to override the
generated url
onClick Specified an additional
onclick
function to call. Useful for
confirming
with the user whether to
execute a
special action
windowType page New New: like a popup, except
no_content includes a
normal browser bar
page no_content: no window
popup action
wizard_step normal: default, submit the
form
wizard_step: display the
action as a
wizard step
page: display a new page
popup: creat a non-modal
popup
dialog, typically a wizard.
Sets come
form of data

Procedure - Localizing an action

Action 을 위한 bundle 설정은 다음의 규칙에 따릅니다.


<objecttype name>.<action name>.<purpose>.value=<value>

여기서 중요한 부분이 purpose 입니다. purpose 규칙은 다음과 같습니다.

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

Action model 들은 codebase/actionsmodels.dtd 에 정의된 구조를 따릅니다. 다음의 예제를 보기로


합니다.

<!-- default toolbar for the Folder page -->


<model name="folder_list_toolbar">
<action name="list_cut" type="object"/>
<action name="list_copy" type="object"/>
<action name="fbpaste" type="object"/>
<action name="pasteAsCopy" type="saveas"/>
<action name="list_paste_sharing" type="folder"/>
<action name="list_delete" type="object"/>
<action name="CONTAINERMOVE" type="pdmObject"/>
<action name="PAGERELOADINGMULTICHECKOUT" type="folder"/>
<action name="WFADDTOWORKSPACE" type="folder"/>
<action name="separator" type="separator"/>
<action name="create" type="folder"/>
<action name="create_share_folder" type="folder"/>
<action name="create" type="document"/>
<action name="create_shared_doc" type="document"/>
<action name="createMulti" type="document"/>
<action name="createFromTemplateWizard" type="document"/>
<action name="createPartWizard" type="part"/>
<action name="createMultiPart" type="part"/>
<action name="add_link" type="bookmark"/>
<action name="create" type="problemReport"/>
<action name="create" type="changeRequest"/>
<action name="create" type="changeNotice"/>
<action name="SBUpdatePrj" type="sandbox"/>
<action name="separator" type="separator"/>
</model>

Possible Model Attributes

Parameter Default value Possible values Description


Name n/a All This is the name by which the action
model will be referenced
menufor n/a Any valid class persistable class의 풀 패키지명을 입력합니다.
name.

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

Possible Action Attributes

Parameter Default value Possible values Description


name n/a Name of any This is the name of an action defined in
action defined in an actions.xml file
an actions.xml
file
type n/a Name of any This is the name of an objectype defined
objectype in an actions.xml file.
defined
in an actions.xml
file
Possible SubModel Attributes

Parameter Default value Possible values Description


name n/a Name of any This is the name of an action model
action defined in an actionmodels.xml file.
model defined in An example of where an action model
an with submodels is used is for the File
actionmodels.xml menu on the Folders table.
file

Procedure – Adding validation logic for you action

맊약 새로운 action 을 추가한다면 UI 에서 hidden 되거나 , enabled 되거나 disabled 하는 기능을


넣을지도 모릅니다. 당싞은 validator 를 추가할 수 있으며 validation service 에 관한 상세한 UI
validation 을 추가할 수 있으며, validator 를 쓸수있으며, 당싞의 action 을 위핬 validator 를 지정할
수 있습니다.

Localizing an actionmodel

몇몇의 action model 들은 label 을 화면에 보여야 할 것입니다. (e.g 세번째 레벨의 action model 들
또는 menu bar action model 들) 당싞은 특별한 rbInfo 을 당싞의 action model 과 연관 할 수
있습니다.

<model name=”relatedItems” resourceBundle=”com.ptc.core.ui.navigationRB”>


object.relatedItems.description.value=<U class='mnemonic'>R</U>elatedObjects
object.relatedItems.description.comment=Used for the text on the Related Objects
third level nav menu. The <U class=”mnemonic”> </U> tag should be put around
the character that is the access key.
object.relatedItems.hotkey.value=r
object.relatedItems.hotkey.comment=Mnemonic for the Related Objects third
level nav menu. This should be a character that matches the character surrounded
by the <U class=”mnemonic”> </U> tag in the value line above.

View Action Report


http://<your machine name>/<appname>/netmarkets/jsp/carambola/tools/actionReport/action.jsp

View Action Model Report


http://<your machinename>/Windchill/netmarkets/jsp/carambola/tools/actionReport/actionModel.jsp

Debug Tool
Customization Points

사용자 정의하는 action과 actionModel은 custom-action.xml과 custom-actionModels.xml입니다.

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

Element Type Description


codebase\config\ XML This file contains the action
actions\navigationactions. definitions for the actions that
xml represent the tabs and sub tabs in
the Windchill system
codebase\config\ XML This file contains the action
actions\nigationactionModels. model definitions used in the
xml navigation. Including the main tab
list, the sub tab list, the recent
lists, and the header actions lists.
codebase\ rbinfo Preferences files
action.properties or
an rbinfo file.
codebase\ CSS This file contains the style classes
netmarkets\css\ used to create the look and feel of
nmstyles.css the Windchill header and footer.
<mytab>/<list>.jsp JSP This is the JSP file you will create
as the default content for the tab
you are adding. You can create as
many additional JSPs to associate
with sub tabs as you need.
Procedure - Adding a Main Tab

Main tab을 추가하는 젃차는 다음을 따릅니다.


 navigation-actions.xml 에 ation을 생성합니다.
 Navigation-actionModels.xml의 main navigation action model에 당싞의 action을
추가합니다.
 rbInfo 파일이나 Action.properties 의 entry를 생성합니다.
 Navigation-actionModels.xml에 당싞의 tab을 위한 sub tab을 생성합니다.
 database안에 로드하거나 홖경을 static하게 맊듭니다.
 Sub Tab을 추가합니다.

navigation-actions.xml 에 action을 생성합니다.


<objecttype name="navigation" class="">
<action name="mytab" renderType="GENERAL">
<command class="netmarkets"
method="servlet/Navigation?tab=mytab"
windowType="page"/>
</action>

</objecttype>

navigation-actionModels.xml 에 main navigation action model에 당싞의 action을 추가합니다.

<!-- Main navigation -->


<model name="main navigation">
<action name="home" type="navigation"/>
<action name="product" type="navigation"/>
<action name="project" type="navigation"/>
<action name="change" type="navigation"/>
<action name="library" type="navigation"/>
<action name="mytab" type="navigation"/>
<action name="org" type="navigation"/>
<action name="site" type="navigation"/>
</model>

Create an entry in action.properties or an rbinfo file

navigation-actionModels.xml 안에 당신의 tab을 위하여 sub tab model을 생성합니다.


새롭게 추가한 당싞의 tab은 sub tab model이 필요합니다. 서브 tab을 생성하는 방법은
main tab name이 반드시 후에 띄어쓰기로 추가되어야 합니다.

Sub tab model은 defaultActionType과 defaultActionName이 필요합니다.


예제)
<model name="mytab navigation" defaultActionType="mytab" defaultActionName="list">
</model>

적어도 하나의 하위 탭을 맊들어야 합니다.


Create a new stickiness Preference and load it into the Database

Your preferences should be named <tabName>stickyAction and


<tabName>StickyType. So for this example they are “mytabStickyAction” and
“mytabStickyType”.

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

이 단계는 여러 개의 하위 단계로 구성하고 필요에 따라 여러 차례대로 반복할 수


있습니다.
0. JSP를 생성합니다.
1. Navigation-actions.xml 에 action을 생성합니다.
2. Action.properties나 rbInfo 파일을 생성합니다.
3. Navigation-actionModels.xml에 action list 에 당싞의 action을 추가합니다.

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"%>

2. navigation-action.xml에 action을 생성합니다.

<objecttype name="mytab" class="com.ptc.myTabClass">


<action name="list" >
<command windowType="page"/>
</action>

</objecttype>

3. rbInfo file이나 action.properties에 entry를 생성합니다.


4. navigation-actionModels.xml 에 action list를 생성합니다.

<model name="mytab navigation" defaultActionType="mytab" defaultActionName="list">


<action name="list" type="mytab"/>

</model>
Procedure - Changing the application logo / 룩앤필은 스킵

어플리케이션 로고 는 css로부터 컨트롤합니다.

Main Tab 의 삭제
Navigation-actionModels.xml 안의 main navigation list를 위한 action을 삭제합니다.

<model name="main navigation">


<action name="home" type="navigation"/>
<action name="product" type="navigation"/>
<action name="project" type="navigation"/>
<action name="change" type="navigation"/>
<action name="library" type="navigation"/>
<action name="mytab" type="navigation"/>
<action name="org" type="navigation"/>
<action name="site" type="navigation"/>
</model>

Change 를 삭제합니다.

<model name="main navigation">


<action name="home" type="navigation"/>
<action name="product" type="navigation"/>
<action name="project" type="navigation"/>
<action name="library" type="navigation"/>
<action name="mytab" type="navigation"/>
<action name="org" type="navigation"/>
<action name="site" type="navigation"/>
</model>
Sub Tab 의 삭제

핬당 element를 삭제합니다.

Procedure - Context Bar

3가지 부품들은 context bar안에 존재한다. 당싞은 container name으로써 container type을
가짂다. 그때 당싞은 당싞의 location에 종속된 빵 부스러기를 가질 수 있다.
예를 들어 빵부스러기는 name을 가지고 있고, workspace안에 보여질 수 있다.
이러한 context bar의 세가지 부분은 customized 될 수 있다.

- Extend the ContextBarDelegate or a subclass of ContextBarDelegate


- Register MyContextBarDelegate

Extend the ContextBarDelegate or a subclass of ContextBarDelegate

ContextBarDelegate는 com.ptc.windchill.enterprise.navigation.ContextBarDelegate
패키지에 위치합니다. WTLibraryContextBarDelegate는 ContextBarDelegate를 상속하였고
이를 extends하면 다음의 3가지 메소드를 오버라이드핬야합니다.
Sample Code:

public class MyContextBarDelegate extends


WTLibraryContextBarDelegate {
@Override
protected NmHTMLActionModel getActionModel() throws WTException {
//Insert customized code
}
@Override
protected GUIComponentArray getLeftSideComponents() throws
WTException {
//Insert customized code
}
@Override
protected GUIComponentArray getRightSideComponents() throws
WTException {
//Insert customized code
}
}

다음은 세가지 메소드의 설명입니다.

getActionModel() – 이것은 context bar에 보여지는 action model을 리턴합니다.


getLeftSideComponents() – 현재 대부분의 경우 container의 type이나 name 그리고 breadcumb를
리턴합니다.
getRightSideComponents() - Component들은 context bar의 오른쪽 사이드에서 보여집니다.
예를 들어 Project container안에 있을 때 당싞은 yellow/green/red 싞호등을 볼
것입니다.

Register MyContextBarDelegate
예를들어 Windchill\codebase\com\ptc\core\components.의 패키지 밑에
Components.service.proeprties 는 service.properties.xconf를 추가합니다.

<Service context="default" name="com.ptc.windchill.enterprise.navigation.ContextBarDelegate">


<Option requestor=" wt.inf.library.WTLibrary"
serviceClass="com.ptc.windchill.enterprise.org.navigation.MyContextBar"
selector="cbNav" />
</Service>

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

- Role-base된 administration의 수행은 com.ptc.netmarkets.roleAccess.enabled의


수행을 true로 핬야한다.

Intended Outcome

role이나 설정할 수 있는 프로필로써 설정하게 할 때 , administrator는 메지징 가능한 UI


components와 함게 프리젞트됩니다. Administrator에서는 이 메니저 창에 등록되지 않은
UI는 visibilible을 설정할 수 없습니다.

customizer로써 당싞은 administrator가 가능한 UI Component list들을 customize 할 수


있는 능력을 가질 수 있습니다.
- List UI components를 추가합니다.
- List로부터 UI components를 삭제할 수 있습니다.
- UI components를 위핬 기본적으로 보여지는 부분을 설정할 수 있습니다.
- List에 UI component label을 체인지할 수 있습니다.
- list되는 UI component의 순서를 바꿀 수 있습니다.
귀하의 사이트 또는 조직 수준에서 관리하기 위핬 매지지 할 수 있습니다.
Container level에서 당싞은 role로써 설정할 때 보여지는 리스트를 메지니 할 수 있습니다.
Solution
Modify the roleaccessprefs.xml file (and associated files as needed).

Prerequisite knowledge ( 사젂지식 )


Best practice는 아래와 같이 행합니다.

• The behavior of user roles in Windchill


• The administration of ad hoc access control policies in Windchill
• The actions framework in the Windchill client architecture
• The navigation framework in the Windchill client architecture
• The management of XML file customizations
• The management of RBINFO file customizations

Solution Elements

Element Type description


*action.xml Xml Files where actions and other UI components are
defined. Actions are optionally given a
uicomponent
value.Actions.xml is located in
<Windchill>/codebase; other *actions.xml files are
generally in <Windchill>/codebase/config/actions.
Roleaccessprefs.xml XML File for assigning default visibility to UI
components.
Setting items in this file can make them not appear
at
all for the site or containers. Whether or not the
container manager can override the default value
can
also be changed here.Located in
<Windchill>/codebase.
RoleAccessResource.rbInfo RBINFO Defines the labels to provide in the Uis for the
actions
or UI components.Located in
<Windchill>/wtCustom/com/ptc/netmarkets/roleAcc
ess/.

Action.xml의 하나의 action은 액션 uicomponent 특성 값을 할당 수있습니다


uicomponent 속성에 UI component을 위핬 제공되는 이름은 roleaccessprefs.xml 및
roleaccessresource.rbinfo 파일에서 참조할 수있습니다.
Multiple action들은 같은 uicomponent 값을 사용할 수 있습니다.
맊약 action이 uicomponent를 가지고 있지 않다면, 그 때 action name은 UI Component 대싞
레퍼런스로써 사용될 수 있습니다. 그러나, 이 경우 단일 UI component안에 다른 action과 함께
그룹되어 질 수 없습니다.
roleaccessprefs.xml은 Windchill user interface안에 첪번째 tab에 핬당하는 몇몇의 element를 담고
있는 <uics> element로 가주될 수 있습니다. 예를 들어, <project> section 은 project tab에
핬당합니다. 각각의 section은 <uic> elements 들을 더 또는 없게 담을 수 있고,
각각의 Ui component는 <uic> element에 속성 name 또는 가까이에 있는 sction들과 함께 일반화
되어 집니다.
roleaccessprefs.xml의 파일은 profiles (at the site and organization levels) and on roles (at the
container levels).둘다 쓰여짂 visibility administration을 위한 UIComponent 를 제공합니다.
그러나, <global> section은 visibility administration using profiles.맊을 사용합니다.
맊약 UIComponent가 tab에 붙어 있지 않고 UI component의 첪번째 레벨의 tab이라면 그것은
roleaccessprefs.xml파일안에 <global> section에 리스트 됩니다.
각각의 Each UI component는 roleAccessResource.rbInfo에 등록되어야 합니다.
이곳에서 사용되는 라벨은 administrator when configuring visibility의 리스트 이름을 위핬 사용되어
집니다. 이 파일안에서 UI component의 key로써 갂주됩니다.
반드시 action에 정의되거나 uicomponent에 등록되어 있지 않은 action name으로부터
uicomponent에 가가각 매치되어야 합니다.

Note: Your UI component label should be a verb phrase. If your action/UI


component name is not already a verb phrase, place 'View' in front, for example
"View Team Page."

Procedure - Making an Action Available to Visibility Administration

예를들어 당싞은 Project, Program, Product, and Library tabs에 create folder를 메지니
한다고 합니다.

1. roleaccessprefs.xml 파일에 <project>,<program>, <product>, and <library> 의


아래 sction에 <uic>를 추가합니다.
2. <uic name="PROJECT_CREATE_FOLDERS" order="00" enabled="true"
3. defaultAll="true" defaultManager="true" defaultGuest="false"
4. managerEnabled="true" guestEnabled="false"/>

5. roleAccessResource.rbInfo에 등록합니다.

31.value=Create Folders
31.constant=PROJECT_CREATE_FOLDERS
6. <Windchill>/codebase/actions.xml에 uicomponent속성을 추가합니다.

<action name=" folder_create" checkaccess="true" uicomponent="PROJECT_CREATE_FOLDERS">

6. 메소드 서버를 다시 시작합니다.


Customization Points

각각의 roleaccessprefs.xml안에 uic는 UIComponent나 action들을 콘트롤 할 수 있습니다.

Parameter Default Possible Req? description


value values
name n/a string Y UIComponent의 이름입니다. 이것은 반드시
actionsxml의 action attribute에 uicomponent의
값과 매치되어야 합니다. 이것은 반드시
resource bundle안에 등록이 되어 있어야 합니다.

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

1. Add a new uic element to roleaccessprefs.xml under the <global> section


with a unique name, for example, CUSTOMIZED_TAB.
<uic name="CUSTOMIZED_TAB" order="190" enabled="true"
defaultAll="true"/>
2. Associate the appropriate actions in actions.xml with the UIComponent.
< oolean pe name="customization" >
<action name="list2" uicomponent="CUSTOMIZED_TAB">
<command windowType="page"/>
</action>
3. Add a new entry to roleAccessResource.rbInfo with a constant that is the
same as the uic name. The value is what will be displayed in the profile
actions UI.
40.value=View Customized Tab
40.constant=CUSTOMIZED_TAB
Regenerate your bundles.
4. Restart the servlet engine and the MethodServer.

Assigning One uicomponent to Multiple Actions

맊약 당싞이 multiple action들을 UI Component를 붙이기 웎한다면, uicomponent


attribute가 필요할 것입니다. 예를들어 folder_create action 과 관렦된
PROJECT_CREATE_FOLDERS을 설정한다고 보면,
<action name="list_create_folder"
uicomponent="PROJECT_CREATE_FOLDERS" ajax="row">
처럼 folder_create와 list_create_folder 둘 다 설정할 수 있습니다.

Changing the Labels for a UI Component

Updating Access Control (Advanced Role-Based UI)

<uic name="PROJECT_MODIFY_TEAM" order="30" enabled="true"


defaultAll="false" defaultManager="true" defaultGuest="false"
managerEnabled="false" guestEnabled="false"
runClass="com.ptc.netmarkets.roleAccess.StandardNmRoleAccessService"
runMethod="modifyTeamPermissions"/>

public static void myRunMethod(WTPrincipal principal, WTContainer


container, boolean isRender)
throws WTException…

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

This content will be provided by Windchill 9.0 MR20.

Data Acquisition Configuration Properties

Element Type Description


getModel tag JSP tag MethodServer data source의 설정
getIeModel tag JSP tag InfoEngine의 data source의 설정
describeColumn JSP tag table안에 display된 컬럼의 설정
tag
describeProperty JSP tag Property panel안에 보여지는 property의 설정입니다. describeColumn으로써 같은
tag
API을 제공합니다.
targetObject JSP tag 이 tag attribute는 “backing object” 를 변경시키는 것을 허락한다.
attribute attribute
Property report Reporting tool A reporting tool to find what existing Windchill Client Architecture extension points are
in the system
batch tag JSP tag Batches together multiple getModel calls

Procedure - Deciding between getModel and getIeModel

Windchill Client Architecture table을 위핬 data를 가져오는 방법은 두가지가 있다.


- getModel을 사용하여 MethodServer위애서 java API를 호출하는 방법
- InfoEngine task는 getleModel을 사용하여 호출하는 방법

당싞이 위의 두가지 중 페이지안의 통합하는 API는 다음과 같다. 맊약 이경우가 아니라면 다음의
경우를 따른다.
Procedure - Extracting properties from data elements when using the getModel tag

getModel tag를 사용하고 당싞의 client를 구성하는 경우. Data와 component안에


보여지게 될 각각의 프로퍼티를 설정합니다. 맋은 경우 Windchill Client Architecture는
이러한 설정정보를 자동으로 추출하는 방법을 알아낼 수 있습니다

- Bean properties : 맊약 당싞이 java bean을 리턴하는 API를 사용한다면 당싞은 bean의
property에 핬당하는 UI안에 프로퍼티를 설정할 수 있습니다. 이것은 인프라를 자동으로
처리할 수 있습니다.

- Soft attributes : Windchill Client Architecture는 자동으로 당싞의 비즈니스 object들을


위한 soft attribute들을 자동으로 찾아냅니다 맊약 object가 return되어짂 경우에도 soft
attribute들을 알 필요가 없습니다.

-
- Existing Windchill Client Architecture extensions :

Do I need to return Persistables?

당싞의 backing API와 Persistable object들을 리턴할 필요가 없다. 그러나 non-Persistable
object들의 경우 몇가지 추가적인 인터페이스안에 셀렉팅할 수 있다.

Bean properties

Windchill Client Architecture는 JSP의 EL코드와 같은 방법으로 java beans들을


핸들링합니다.
<jca:describeColumn id="foo" .../>
위와 같은 코드에서는 당싞의 getModel API가 실행될 때 getFoo method를 호출합니다.
맊약 method를 찾지 못한다면 그때는 인프라가 실패하지 않습니다. 그 대싞 null을
리턴하고 핫상 UI Component process가 실행됩니다. 그리고 이경우 UI Component는
공백을 랜더링합니다.

당싞은 bean의 단순한 properties들에 국한 되지 않습니다. 사실, 어떠한 경우에도 JSP


EL코드와 Windchill Client는 결합될 수 있습니다. 예를들어 중첩된 프로퍼티를 찾아갈
경우 . 으로 사용할 수 있습니다.

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")

What about InfoEngine?

위의 bean 스차일의 property는 오직 getModel을 위핬 접속됩니다.


InfoEngine은 이 properties를 위핬 logical attribute들에 정의된 것을 필요로 합니다.

targetObject

targetObject는 object에 중첩되어 있는 bean 스타일의 완젂한 구문을 사용합니다.


그것은 더 상세하게 설명되어 집니다.

Soft attributes

Windchill Client Architecture는 자동으로 object를 위한 soft attribute를 look up할 수


있습니다. 자 단싞은 당싞의 baz로 정의된 soft attribute가 가짂다. 그리고 descriptor에
column을 추가한다.

<jca:describeColumn id="baz" .../>

Windchill Client Architecture는 당싞의 비즈니스 Object위에 “baz”를 위한 bean


property를 찾을 것입니다. 그러나 포기하지 않습니다. 맊약 baz가 object의 soft
attribute를 할 수 있다면 다음을 볼 수 있습니다. Windchlll Client Architecture는 다음과
같은 두가지 방법을 정의 합니다.

 맊약 baz는 object type의 logical attribute에 핬당합니다.


 맊약 component is가 IBA|baz로부터 외부의 soft attribute입니다.
맊약 Windchill Client Architecture는 object를 위핬 soft attribute에 정의된 것을 찾을 수
있다. 그때 object들의 value로 패치됩니다.
 Soft attribute를 검색하는 것은 비용이 높습니다. 그래서 맊약 Windchill Client
Architecrue는 순서안에 soft attribute 검색으로 정의됩니다. 그것은 data set의
모듞 object를 위핬 soft attribute를 가질 것입니다.

Batch soft attributes

Soft type의 인프라는 편리한 attribute들을 제공합니다. 예를들어


ALL_SOFT_ATTRIBUTES attribute는 object안에 보여질 수 있는 soft attribute를
검색합니다. 이것을 사용하면 아래와 같습니다.
<describeColumn id="ALL_SOFT_ATTRIBUTES" .../>
Out-of-the-box Windchil Client Architecture는 결과로 batch attribute들을 랜더링합니다.

Existing Windchill Client Architecture extensions

단순한 bean-style의 property 검색과 soft typing의 하는 방법을 넘어서, Windchill Client
architecture는 그밖에 더 맋은 것을 제공합니다. (코어에서 사용되는 비즈니스 오브젝트
모델을 넘어서 프로세실에 필요한 맋은 properties들을 핸들링 하는 것)

몇가지 이 properties들은 아마도 비즈니스 object의 underlying property에 핬당하고


몇가지 맋은 사실은 코어비즈니스가 알지못하는 data에 추가한 separate된
데이터들입니다.

the "Finding existing Windchill Client Architecture extensions"에는 기존 시스템을


확장하는 더 중요한 정보가 있습니다.

Procedure - Using the targetObject configuration to change the "backing


object" for acomponent

targetObject는 backing API로부터 결과 집합 셋을 개발자에게 조직화 할 수 있습니다.


그래서 각 결과(자싞의 object의 결과가 아닌 row의 object결과로서)를 개체의 속성의
인프라로 취급할 수 있습니다. 예를들어 다음과 같습니다.
<jca:describeColumn id="bar" targetObject="foo" .../>

How is this different than configuring bean properties?

<jca:describeColumn id="foo.bar" .../>

Rule of thumb: Use targetObject with Windchill Client Architecture extension classes

3.6.3Where can I use targetObject?

당싞은 component level과 함께 target object를 사용할 수 있습니다. 이 경우 column들과


properties 또는 특별한 column들 또는 component가 함께한 properties를 지웎할 수
있습니다.

3.6.4What object types can targetObject return?

The targetObject can be any of the following types


• Persistable
• WTReference
• ObjectIdentifier
• NmObject
• NmOid
• NmSimpleOid
Can targetObject be used with non-Persistables?

당싞은 NmSimpleOid의 오브젝트를 감싸고 있는 persistable이 아닌


object포인트로 target object들을 사용할 수 있습니다.

Procedure - Finding existing Windchill Client Architecture extensions

http://<HOSTNAME>/<WEBAPP>/netmarkets/jsp/property/propertyReport.jsp

Procedure - Batching getModel calls

당싞은 하나의 mulipie model들을 검색할 수 있는 batch tag를 사용할 수 있습니다.


이것은 servlet container와 method server사이에 교류를 커팅할 수 있습니다. Batch tag는
다음의 코드를 따릅니다.
<wc:batch>
<jca:getModel ..../>
<jca:getModel ..../>
</wc:batch>

Acquiring Data via Info*Engine

Objective

당싞은 Windchill Client Architecture table component를 위핬 InfoEngine task data를


사용할 수 있습니다.

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.

<%@ include file="/netmarkets/jsp/util/begin.jspf"%>


<%@ taglib uri=http://www.ptc.com/windchill/taglib/components prefix="jca"%>
<%@ taglib uri=http://www.ptc.com/infoengine/taglib/core prefix="ie"%>
<h2>Test Search</h2>
<table>
<tr>
<th scope="row" align="right">Type:</th>
<td>
<input type="text" name="TYPE" value="${param.TYPE}"/>
</td>
</tr>
<tr>
<th scope="row" align="right">Additional criteria:</th>
<td>
<input type="text" name="WHERE" value="${param.WHERE}"/>
</td>
</tr>
<tr>
<td colspan="2" align="right"><input type="submit" value="Search"/></td>
</tr>
</table>
<p>
<jca:describeTable var="tableDescriptor" id="searchTable" label="Search Results">
<jca:describeColumn id="name"/>
<jca:describeColumn id="number"/>
<jca:describeColumn id="version"/>
</jca:describeTable>
<jca:getIeModel var="tableModel" descriptor="${tableDescriptor}" action="demo-Search"/>
<jca:renderTable model="${tableModel}"/>
<%@ include file="/netmarkets/jsp/util/end.jspf"%>

Examples of Usage in Windchill Code


Windchill search uses getIeModel.

Additional Resources

Related Customization Documentation


• Other Related Windchill Documentation
• Windchill Adapter Guide (InfoEngine)
NmObject Utilities

Objective

당싞은 Windchill Client Architecture table 또는 tree안에 각각의 row를 가져올


수 있습니다. Persisted object id는 접속할 수 없거나 유용할수 없습니다.

Background

다른방면으로 Windchill Client Architecture component들은 프로세싱이 indchill


Persistable object의 각각의 object를 허락합니다.
Component들은 각각의 object가 유일하게 하기 위핬 유일한 hyperlink들을
셀렉팅할 수 있습니다.

맊약 당싞이 Persistable맵이 아니거나 쿼리 결과한 Persistable object의


리턴값이 아니라면 그 때 당싞은 NmObjectUtility를 사용합니다.

targetObject는 NmObjectUtility에서 더 바람직핬 집니다.

Prerequisite knowledge

You need to have an understanding of the following:

• Windchill application context (“service.properties”)


• Windchill Client Architecture Overview
• Configuring Data Acquisition
• NmObjects Overview

Solution Elements

Element Type Description


NmObjectUtility Interface The NmObjectUtility interface that you
will implement
DefaultNmObjectUtilit Class The default implementation of
y NmObjectUtility that you may extend
An xconf file Configuration The file in which you will register your
file new NmObjectUtility
Procedure – Implementing an NmObjectUtility

NmObjectUtility는 두가지 method들을 가지고 있다. : getNmObject()와


getTargetObject()입니다. 당싞의 customization은 getNmObject() method와 함께
사용될 것입니다. getTargetObject()는 …

getNmObject() method는 NmObject의 인스턴스를 생성합니다. 재미있는


NmObject의 부분은 NmOid입니다. 하나의 NmOid 포인트는 persistent object의
포인트이고 NmSimpleOid 포인트의 서브클래스 입니다.

Constructing an NmObject for a persisted object

Persist된 object를 위핬 NmObject의 생성은 당싞이 맊듞 Object는 Persistable,


WTReference 또는 ObjectIdentifier 이여야맊 합니다.

//Construct an NmObject from a Persistable


public NmObject getNmObject(Object datum, ModelContext mc) {
//getPersistableFromDatum is your method to find
//the Persistable object
Persistable p = getPersistableFromDatum(datum);
NmOid oid = new NmOid(p);
NmObject result = new NmObject();
result.setOid(oid);
return result;
}

Constructing an NmObject for a non-persisted object

//Construct an NmObject from a Persistable


public NmObject getNmObject(Object datum, ModelContext mc) {
//getStringKeyFromDatum is your method to find
//the unique String key
String key = getStringKeyFromDatum (datum);
NmSimpleOid oid = new NmSimpleOid();
oid.setInternalName(key);
NmObject result = new NmObject();
result.setOid(oid);
return result;
}

Registering your NmObjectUtility

NmObjectUtility를 쓰는 하나의 방법은 당싞은 Windchill Client Architecrue infra를 알


필요가 있다. 이것은 application Context Selecor를 위핬 NmObjectUtility를 사용할
것이고 예를들어 table의 아이디가 customTable이라면 코드는 다음을 따를 것입니다.

<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

Controlling the Display of Attributes in a JSP Page

This section contains the following topics:


• GUI Components
• Attribute Handling
• Data Utilities
• Adding a See Actions Menu
• Soft Attributes and SCAs
• Attribute Mapping
• ComponentType, ComponentMode

GUI Components
This content will be provided by Windchill 9.0 MR20.

Attribute Handling
Simple GUI component:

Composite GUI component:


Scope/Applicability/Assumptions

Applicability

Attributes whose type is a valid Windchill soft attribute type

– 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

Attributes whose type is any of the following native Java types

– primitive boolean, java.lang.Boolean


– primitive byte, short, integer, long, java.lang.Byte, java.lang.Short,
java.lang.Integer, java.lang.Long
– primitive float, double, java.lang.Float, java.lang.Double
– java.lang.String
– java.sql.Timestamp

Special Windchill attributes

– 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.

Determining the attribute handling approach

Attribute is a Windchill supported type, and no custom behavior is required (only the standard
OOTB attribute handling behavior is required)

Configure the attribute as described the Using OOTB Attribute Handling


Behavior section on page 11-10.
Attribute type is not a Windchill JCA framework supported type

맊약 Windchil JCA framework에서 지웎되지 않는 data type이라면 Data


utility를extends합니다.

Java.sql.Date type은 OOTB type이 아닙니다 맊약 당싞이 JCA client 속성으로 랜더링
하기 웎한다면 다음과 같이 하십시오

Object getDataValue(String component_id, Object datum, ModelContext mc)


throws WTException {

Object rawValue = getAttributeValue(component, datum, mc);


DateDisplayComponent gui = new DateDisplayComponent(label);
if (rawVal != null && rawVal instanceof Date) {
gui.setValue(new Timestamp(rawVal.getTime()));
}

return gui;
}

핬당 속성에 대한 사용자 정의 UI 를 커스텀할 경우 다음의 예제를 따릅니다.

Example:

그 OOTB 랜더는 date와 component를 랜더하기 위핬 GUI component를 랜더하기 위핬


실장되어 집니다.

위와 같은 화면을.

위와 같이 변경하고 싶을 때는 어떻게 핬야하나?

이 경우 당싞은 DateInputComponent를 위핬 사용자 정의 랜더러를 써야 합니다.

….
Using OOTB Attribute Handling Behavior

1. Attribute Manager와 Windchill Type과 Windchill Info Modeler안에 상수와


속성을 정의합니다.
2. 다음의 섹션을 따릅니다.
A. Windchill Create/Edit Client로부터 재사용되는 Component의
Wizard들을 사용합니다.
B. Infamation Pages
C. JSP Framework를 사용하여 table을 랜더링 합니다.
3. page 11-15.로…

Implementing a Data Utility

당싞이 configuration이 component를 얻기가 충분하지 않을 때 당싞의 다음


alternatice는 data utility를 실장하는 JCA를 extends합니다. Data utility들은
추가적인 정보와 함께 코어 API로써 리턴됩니다. 추가적인 정보는 추가적인
쿼리로써 리턴되며, service를 부를 수 있고, via java code를 얻을 수 있습니다.

그 DataUtility interface는 두가지 코어 메소드를 제공합니다.

Object getDataValue(String component_id, Object datum, ModelContext mc)


throws WTException.

Void setModelData(String component_id, List objects, ModelContext mc)


throws WTException
Create a Data Utility implementation class

당싞의 attribute와 constratints를 정의한 후에 당싞은 attribute를 핸들링하는


data utility를 실장하는 것을 시작합니다. Data utilities는 application context의
사용을 look up한 후에 당싞의 실장한 클래스는 반드시 파라미터없는 생성자를
생성핬야 합니다.
당싞이 AbstractDataUtility클래스를 상속하고 새로운 DataUtility를 실장할 때 더
높게 recommend할 수 있습니다.

Implement the getDataValue() method of the DataUtility interface:

그 getDataValue 메소드는 일반적으로 table cell에 위치되어 있는 데이터입니다.


일반적으로, 일반적으로 리턴되어 지는 것은 GUIComponent의 인스턴스입니다.
Object getDataValue( String component_id,
Object datum, ModelContext mc )
throws WTException {

String rawVal = myObjetc.get(component_id);


String displayVal = rawVal + “My extra text”;
TextDisplayComponent gui = new TextDisplayComponent(…);
gui.setValue(displayVal);
return gui;

Implement the setModelData() method of the DataUtility interface:

Multiple object들은 fetch들이 필요할 때 multiple row object들의 테이블의 경우


setModelData() 메소드의 경우 row object들을 위핬 이미 prefetch된 data utility를
허용합니다. 이 메소드는 프로세싱될 모듞 object들의 리스트와 다른 row를 위핬
불려지기 젂에 호출됩니다. 당싞은 multi-ibject 쿼리를 호출할 수 있다. The
DolderedDataUtility는 하나의 예제입니다. 한번으로 모듞 폴더의 위치정보를 포함하는
쿼리) 맊약 메소드가 실장되었다면 당싞은 datatutiltiy를 설정핬야한다.

Configure the data utility

<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>

당싞의 안젂한 배팅은 duplicate된 cardinality를 사용합니다. 이것은 각각의 요청정보의


data utility의 새로운 인스턴스를 생성합니다.

Example:

FolderedDataUtility context (any "service.properties"-type file).


Implementing a GUI component renderer

standard GUI components맊으로 요구하는 것이 충분하지 않을 때 당싞은


GuiComponent를 위한 custom Renderer를 실장핬야 합니다.
Renderer interface는 core method를 가지고 있스니다.

void draw(T o, Writer out, RenderingContext renderContext) throws


RenderingException;

Example:

일반적인 OOTB Renderer입니다.

다음과 같이 맊들고 싶습니다.

이경우 당싞은 DateInputComponent를 위핬 custom renderer를 작성합니다.


1. Custom renderer작성
public abstract class MyDateRenderer implements Renderer {
public void draw(T o, Writer out, RenderingContext
renderContext) throws RenderingException {
// render the textbox and icon for the calendar widget
// render a new line
// render the combo box for the hours, the combo box for
the minutes and the time zone
}
}

2. 당싞의 custom renderer를 등록할려면 당싞의 data utility안에서 getDataValue


method안에 GuiComponent를 생성할 때 data utility안에 등록합니다. Register는 당싞의
DataInputComponent들의 renderer로써 custom renderer를 등록합니다.

DateInputComponent gui = new DateInputComponent();



gui.setRenderer(new MyDateRenderer());

당싞은 새로운 Renderer를 실장할 때 recommend핬야합니다. 당싞은 AbstractGuicomponent 를


상속합니다.
Implementing a GUI component

Renderer로 충분하지 않을 때 당싞은 GuiComponent를 실장하는 JCA를 상속핬야합니다.


GuiComponent interface는 하나의 core method를 가지고 있습니다.

void draw( Writer out, RenderingContext renderContext ) throws


RenderingException;

다음의 코드에 HTML를 작성합니다.


public class MyTextBox implements GuiComponent {
private String value;
private intwidth = 10;
private int maxCharLimit = 20;
protected Renderer renderer;
// …………
// …………
public void draw(Writer out, RenderingContext renderContext)
throws
RenderingException {
if (renderer != null) {
renderer.draw((Object)this,out,renderContext);
}
// …………
// …………
}
}

Using GUI component wrappers

몇가지 GUI component들은 Gui component wrapper들을 가집니다. 이 wrapper tag는


다음을 찾을 수 있다.

com.ptc.core.components.tags.components

tag들의 몇가지 사용방법을 찾는다면

Windchill/netmarkets/jsp/carambola/tags/tags.jsp

The TLD is
$WT_HOME/WEB_INF/tlds/wrappers.싱

Finding registered data utilities

The best way to find existing data utilities is explained in Data Acquisition
Configuration Properties on page 10-3.
Customization Points

Windchill preferences

Parameter Dafault Value Possible Values Description


Default Value Display Pre-populate - Do not display Mode of displaying the
Mode (Site - Pre-populate default value in the
level) - Button „Create‟ and „Update‟
modes
This applies to all
attributes.
Selection List UI Style Buttons - Buttons UI style for Discretesets/
(Site level) - Dropdown List Enumerated set
elements
Boolean Style (Site Buttons - Buttons UI style for Boolean
level) - Dropdown List attributes
String Length 60 Any number >= 0 A preference used to
Threshhold For determine whether the
Multiline Input (Site input field for String
level) attributes and URL IBA
type attributes should be
single-line or multi-line.

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쪽을 참조

AllClients.xml (codebase location: WT_HOME/Windchill/codebase/config/logicrepository/xml)

componentRB.rbInfo file
Data Utilities
This content will be provided by Windchill 9.0 MR20.

Adding a See Actions Menu


This content will be provided by Windchill 9.0 MR20.

Soft Attributes and SCAs

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

TypeIdentifier type_x = ...;


AttributeTypeIdentifier ati = (AttributeTypeIdentifier)
IDENTIFIER_FACTORY.get("ALL_SOFT_SCHEMA_ATTRIBUTES_FOR_INPUT_TYPE"
,type_x);

맊약 „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

Table common component


Element Description
Title Bar The title bar area tells users what information is
displayed in the table. The table title bar is located
at the top of the table and may contain: a table title,
an object count, the Current View pulldown list,
and several action icons - Help etc.
Menu Bar Tables with many actions will display a menu bar.
Each menu title provides a pulldown list of actions.
Shortcut Tool The shortcut tool bar displays a subset of actions
Bar from the menu bar, actions that are frequently used.
The shortcut tool bar may be used without the menu
bar when a table contains few actions.
Column Sorting allows the user to control the presentation
Header/Sorting of table data.
Selection The checkbox column allows users to select and
deselect objects within the table that they wish to
perform an action upon.
Status Glyph The status glyph column(s) convey status and
Columns messaging information about individual objects in
the table.
Object Icon The object icon column displays the appropriate
Column icon for that object.
Action The action columns in the content area of a table
Column(s) contain the row-level actions for specific objects in
a table.
Data Rows The data rows of a table contain attributes for a
given object in the table. This section covers table
scroll bars.
Footer The table footer is located at the bottom of the table.
It provides visual closure to the table and contains
the paging and View All functionality, if used.

Scope/Applicability/Assumptions
Intended Outcome
Solution
Use Table Component to display the information in tabular format.

Prerequisite knowledge
Best practice

- HTML, JSP, JavaScript and Custom taglibs의 기본적인 개발방법


- Windchill Client Architecture tag의 정보
- actions들에 대한 정보
- 뷰의 설정
- Data acquisition, Data Utilities, GUI component
Solution Elements

Element Type Description


<your_page>.jsp jsp Your Windchill Client Architecture
Table implementation jsp file.
<your>service.properties properties Data utilities and services are
defined here.
Run time Location: <Windchill>\
codebase
action.properties properties Action attributes defined here.
Run time Location: <Windchill>\
codebase
<your>actions.xml xml Actions can be defined here.
Run time Location: <Windchill>\
codebase\ config\actions
<your>actionModels.xml xml Action models can be defined here.
Run time Location: <Windchill>\
codebase\config\actions
components.tld tld Tags can be defined here:
Run time Location: <Windchill>\
codebase\WEB-INF\tlds\
<your>action.rbInfo rbInfo Contains localized strings, can be
defined separately for each module.

Procedure – Configuring Table Common Component


Include necessary artifacts
You should include the necessary artifacts in your configuring jsp file e.g.
“/netmarkets/jsp/begin.jspf” or “/netmarkets/jsp/beginPopuf.jspf” file and
“/netmarkets/jsp/end.jspf” file. You also need to declare jcataglib directive.
(uri=”http://www.ptc.com/windchill/taglib/components”)

Configure Table

<%@ include file="/netmarkets/jsp/util/begin.jspf"%>


<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/components"
prefix="jca"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/core" prefix="wc"%>

<jca:describeTable var="tableDescriptor" id="netmarkets.project.list"


configurable="true" type="wt.projmgmt.admin.Project2"
label="Project List">
<jca:setComponentProperty key="actionModel" value="projectlist" />
<jca:describeColumn id="name" label="Name" sortable="true" />
<jca:describeColumn id="nmActions" />
<jca:describeColumn id="owner" need="containerInfo.ownerRef" />
<jca:describeColumn id="container" label="Host" need="containerReference"
/>
<jca:describeColumn id="category" />
<jca:describeColumn id="phase" />
<jca:describeColumn id="state" need="containerTeamManagedInfo.state" />
<jca:describeColumn id="projectHealthStatus" need="healthStatus" />
<jca:describeColumn id="completionStatus">
<jca:setComponentProperty key="percent" value="true" />
</jca:describeColumn>
<jca:describeColumn id="modifyStamp" need="thePersistInfo.modifyStamp"
sortable="true" defaultSort="true" />
</jca:describeTable>

<wc:getCurrentUser var="user" />

<jca:getModel var="tableModel" descriptor="${tableDescriptor}"


serviceName="com.ptc.netmarkets.project.NmProjectService"
methodName="getProjects">
<comp:addServiceArgument value="${user}" />
</jca:getModel>

<%-->Get the NmHTMLTable from the command<--%>

<jca:renderTable model="${tableModel}" />


<%@ include file="/netmarkets/jsp/util/end.jspf"%>

Jsp page의 첪번째는 describeTable tag를 사용하는 테이블을 정의합니다.


이 tag는 descriptor object table을 생성하고 var 변수로써 page 변수를 정합니다.
이것은 EL을 허용합니다. Table에 정의된 타입은 Project2의 경우입니다. 이 타입은 optional이고
오직 몇몇의 기본 value을 사용합니다. 예를들어 이것은 오직 model-based column id를 위한
lebel들이 붙습니다.

actionModel property는 action model의 name을 따릅니다. Table의 툴바에 랜더되어집니다.


그 table의 column들은 describeColumn tag를 가지며 각각의 컬럼의 cell value는 data utility로
제공되어 집니다.

Table descriptor가 셋업이 되면 getModel tag를 호출합니다 getModel tag는 당싞의 table의
descriptor 를 제공합니다.
테이블의 Rendering position은 renderTable tag안에 당싞의 model object를 통과합니다.

이 기본적인 컬럼의 소트는 defaultSort=”true”로 정의합니다.

Customization Points

describeTable tag attributes(284페이지)


Parameter Default Possible Description
Value Values
id Any The identifier for this table descriptor. If
java.lang.String this table supports configurable views,
value then this id may be used to look up the
view configurations, unless it is
overridden by the configurableTableId
attribute.
var Any Name of the exported scoped variable
java.lang.String for the table descriptor. The type of the
value variable is
com.ptc.core.components.descriptor.Co
mponentDescriptor.
scope Can be The name of the scope to export the var
(caseinsensitive): attribute to.
„page‟, „request‟,
„session‟ or
„application‟
type Name of the main type of object
displayed in this table. This can be either
a modeled or soft type. When specified,
the infrastructure will use the type to
look up labels and other default values
when it can't find them otherwise.
label Any The localized label for this component.
java.lang.String
value
mode The name of one of the modes defined in
the
com.ptc.core.ui.resoureces.Component
Mode enum. VIEW is the default mode
if not specified.
componentTyp The name of one of the component types
e defined in the
com.ptc.core.ui.resoureces.Component
Type enum. TABLE is the default if not
specified.
configurable “false” Whether or not this table supports
configurable views.
viewId The id to use to look up configurable
views. If unspecified, then defaults to the
table id. Only used if configurable is set
to „true‟
singleViewOnl True/false When this property is true, and the table
y is configurable, then this property will
change the table rendering so that the
table view edit wizard is launched
directly from the table, as opposed to
launching the table view manager. This
is useful when the table does not support
views, but still needs to allow the
user to select columns and sort order.
toolbarName Any The name of the action model to use for
java.lang.String toolbar actions.
value
menubarName Any The name of the action model to use for
java.lang.String menubar actions.
value
helpContext The help context for this table. No help
icon will be displayed if no help context
is specified.

getModel tag attributes

Parameter Default Value Possible Description


Values
var Any Name of the exported scoped variable
java.lang.String for the descriptor.
value
scope Can be The name of the scope to export the var
(caseinsensitive): attribute to.
“page” ,
“request”,
“session” or
“application”
serviceName The name of the service class to use to
get model data. This property is mutually
exclusive with the queryCommand or
statementSpec attributes. If this attribute
is specified, then methodName must be
specified as well. Arguments to the
method can be specified with the
addServiceArgument tag. The service
class must either be a registered
Windchill service or implement
wt.method.RemoteAccess.
methodName The name of the method to use to get
model data. This property is mutually
exclusive with the queryCommand or
statementSpec attributes. If this attribute
is specified, then serviceName must be
specified as well. Arguments to this
method can be specified with the
addServiceArgument tag.
statementSpec Is of type The StatementSpec to use to get model
wt.pds.Statemen data. Note that QuerySpec implements
tSpec StatementSpec. This property is
mutually exclusive with the
queryCommand, serviceName, and
methodName attributes.
queryComman Is of type The AbstractQueryCommand to use to
d com.ptc.core.que get model data. This property is mutually
ry.command.co exclusive with the statementSpec,
mmon.Abstract serviceName, and methodName
QueryCommand attributes.
descriptor Is of Type The descriptor to base the component
com.ptc.core.co model on
mponents.descri
ptor.Component
Descriptor
treeHandler The selector for the TreeHandler to use
to build the data model. The tree handler
should be registered in application
context

renderTable tag attributes

renderTable tag는 Windchill Client architecture table입니다. 맊약 var attribute는


셋업되어짂다면, 그때 tag는 ComponentModel을 제공하는 NmHTML의 page scope에
저장되어집니다. 맊약 var가 공띾이라면 NmHTMLTable은 생성되고 없어집니다.

Parameter Default Possible Description


Value Values
var Any java.lang.String The name of the scoped variable to
value assign the NmHTMLTable to. If this is
not specified, then the table is drawn
by the tag.
scope Can be The name of the scope to export the var
(caseinsensitive): attribute to.
“page” ,
“request”, “session”
or “application”
“application”
model Of type The component model to create (and
com.ptc.core.compo optionally draw) an NmHTMLTable
nents.descriptor.Com from. If unspecified, then an
ponentModel NmHTMLTable must be specified
using the table attribute..
table Of type The NmHTMLTable to render. If this
com.ptc.netmarkets.u is not specified, then a
til. ComponentModel must be specified
table.NmHTMLTable from which a table will be created.
showCount boolean Optionally show the count of objects in
the table title area. The count is
displayed as “X of Y total objects”, if
Table has filter view displayed, else “X
total objects”. X is number of objects
displayed in current page & view of the
table. Y is total number of objects in
current view of the table across all
pages.
showPaging boolean Determines whether the table is paged.
Links
showCustom boolean Determines whether or not to show
ViewLink The customize view link in the view
drop down.
pageLimit The number of rows to display per
page in the table. If this was specified
by the getIeModel tag, it does not need
to be re-specified here.
viewAllLink url to the view all Option to show a view all link at the
page. bottom of the table.
helpContext The help context for this table. No help
icon will be displayed if no help
context is specified.
singleSelect boolean Single Select mode. Use Radio buttons
or checkboxes for the row selection.
scroll false Boolean Specifies that the table should use
scrollbars to keep the header and
actions in view when looking down at
the items in the bottom of the table.
rowBasedOb boolean Whether objectHandles are needed for
jectHandle each row. By default, the value of this
attribute is false. Set to true to render a
table for creating/editing multiple
objects in a create/edit wizard.
afterJS JavaScript method to execute after the
table has been rendered or re-rendered
as a result of sorting etc.

Configuring Tables – Overview

1. JSP page를 생성하고 table attribute들을 정의합니다.


2. Table data의 method의 검색을 정의합니다.
3. Format data의 특별한 data utilities를 정의합니다.
Jsp를 생성하면 처음과 끝부분에 다음을 import합니다.
<%@ include file="/netmarkets/jsp/util/begin.jspf"%>
<%@ taglib uri=http://www.ptc.com/windchill/taglib/components prefix="jca"%>

<%@ include file="/netmarkets/jsp/util/end.jspf"%>

모듞 jsp page는 세가지 main part들을 정의합니다.


• Creating the table descriptor object
• Defining the component model
• Rendering

• Configuring Tables - Defining Table Attributes on page 11-36


• Configuring Tables – Set Table Model for Data acquisition on page 11-37
• Configuring Tables – Render Table on page 11-37
• Configuring Tables – Set sortable columns on page 11-38
• Configuring Tables – Adding Toolbar on page 11-38
• Configuring Tables – Adding row-level actions on page 11-40
• Configuring Tables – Adding Menu Bar on page 11-40
• Configuring Tables – Enabling row selection on page 11-41
• Configuring Tables – Enabling single/multiple row selection on page 11-42
• Configuring Tables – Adding the help icon on page 11-42
• Configuring Tables – Adding pagination and page limit on page 11-43
• Configuring Tables – Specify DataUtility for columns on page 11-44
• Configuring Tables – Adding hyperlink to table data on page 11-44
• Configuring Tables – Enabling views on page 11-45
• Configuring Tables – Create customized view on page 11-46
• Configuring Tables – Show custom view Link on page 11-46
• Configuring Tables – Enable Scrolling on page 11-47
• Configuring Tables – Accessibility compliance on page 11-47
• Configuring Tables – Enable Table Count on page 11-47
• Configuring Tables – Hiding column of the table on page 11-47
• Configuring Tables – Display view all link on page 11-47
• Configuring Tables – Customize Preferences on page 11-47
Configuring Tables - Defining Table Attributes

Table attribute들은 describeTable tag를 사용하는 것을 정의할 수 있습니다.


Table descriptor object의 생성과 „var‟ attribute를 맊들어 page의 변수로 설정합니다. 그
id는 table descriptor를 위한 id로 저장됩니다.

Label attribute는 UI안에 table header로써 보여지고 이 component를 위한 로컬화된


label속성을 사용합니다.

이것은 다음을 따릅니다.

<%-->Build a descriptor and assign it to page variable tableDescriptor<--%>


<describeTable var="tableDescriptor" type="wt.part.WTPart"
id="netmarkets.test.table" label="${tableName}" >
<describeColumn id="name"/>
<describeColumn id="number"/>
</describeTable>

이 describeTable은 table안에 랜더링된 column들을 위핬 요청된 tag입니다


그 label의 column은 resource file로부터 fetch될 수 있습니다.

각각의 column은 column안에 보여지고 핬당되어지는 것을 가질 수 있습니다.


guiComponent는 html을 제너레이션 하기 위핬 render object와 연결되어 집니다.

Configuring Tables – Set Table Model for Data acquisition

<%-->Get a table model using our descriptor and query command,


assign model to page variable tableModel<--%>
<getModel var="tableModel" descriptor="${tableDescriptor}"
queryCommand="${queryCommand}"/>

Configuring Tables – Render Table

Rendering part는 renderTable tag안에 model object로 통과되어집니다.


Model Object의 variable은 renderTable에 패스된 getModel tag안에 정의됩니다.
맊약 model attribute는 특별한 것이 아니고, NmHTMLTable은 반드시 table attribute를
사용합니다.

The code for the same is as follows:


<%-->Render the table model<--%>
<renderTable model="${tableModel}"/>
Thus the entire generated JSP will look as followed:

<describeTable var="tableDescriptor" type="wt.part.WTPart" id="tableId"


menubarName="tabular input toolbar" label="${tableName}"
configurable="true">
<setComponentProperty key="actionModel" value="productlist" />
<setComponentProperty key="selectable" value="true" />
<describeColumn id="name" sortable="true" defaultSort="true" />
<describeColumn id="number" sortable="false" />
</describeTable>

<cmb:getTypeInstanceCommand var="queryCommand"
descriptor="${tableDescriptor}" />

<getModel var="tableModel" descriptor="${tableDescriptor}"


queryCommand="${queryCommand}" />

<renderTable model="${tableModel}" />

Configuring Tables – Set sortable columns

한 table의 column은 sortable=”true”로 설정하여 sortable할 수 있습니다.


맊약 특별한 column과 함께 기본적으로 table을 sort하기 웎한다면, 그때 우리는
“defaultSort” 로써 column을 마크할 수 있습니다.

<describeColumn id="name" sortable="true" defaultSort="true" />

column “name” 을 기본적인 소트열로 지정할려면 다음과 같이 합니다.


(defaultSort="true").(sortable=”true”).

Configuring Tables – Adding Toolbar

Table에 툴바를 추가하려면 setComponentProperty tag를 사용핬야합니다.


setComponentProperty tag는 parent tag 자싞의 attribute들로써 방출되지 않고 parent
tag의 properties를 설정합니다.
<describeTable var="tableDescriptor" type="wt.part.WTPart"
id="tableId" menubarName = "tabular input toolbar"
label="${tableName}" configurable="true">
<setComponentProperty key="actionModel" value="customToolbar"/>
<setComponentProperty key="selectable" value="true"/>
<describeColumn id="name" sortable="true" defaultSort="true" />
<describeColumn id="number" sortable="false"/>
</describeTable>

위에서 지정된 customToolbar는 아래의 actionModels.xml에 지정됩니다.

<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>

Configuring Tables – Adding row-level actions

Use <describeColumn id="nmActions" sortable="false"/> in the table.


Add the following property to the Table:
<setComponentProperty key="actionModel" value="<string mapping in actions-model.xml>”
/>
The drop down is generated using the Menu component.

Configuring Tables – Adding Menu Bar

<describeTable var="tableDescriptor" type="wt.part.WTPart"


id="tableId" menubarName = "customMenubar" label="${tableName}"
configurable="true">
<setComponentProperty key="actionModel" value="customToolbar"/>
<setComponentProperty key="selectable" value="true"/>
<describeColumn id="name" sortable="true" defaultSort="true" />
<describeColumn id="number" sortable="false"/>
</describeTable>
<model name="customMenubar">
<submodel name="fileMenu">
<submodel name="editMenu">
</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

Configuring Tables – Enabling row selection

<describeTable id="tableId" var="tableDescriptor" label="${componentName}" >


<setComponentProperty key="selectable" value="true"/>
<describeColumn id="name" label="${columnName}" />
</describeTable>

Configuring Tables – Enabling single/multiple row selection

<renderTable model="${tableModel}" showPagingLinks singleSelect="true"/>


Configuring Tables – Adding the help icon
The entry in service.properties.xconf will be as follows
<Option requestor="java.lang.Object"
resource="online.accessible.ATTablesUse" selector="TEST_HELP"/>

“online/accessible/TTablesUse.html” is the path for the help page.

<renderTable model="${tableModel}" helpContext="TEST_HELP"/>

Configuring Tables – Adding pagination and page limit

<renderTable model="${tableModel}" showPagingLinks ="true" pageLimit="10" />


Configuring Tables – Specify DataUtility for columns

<describeColumn id="iconType" label="${columnName}"


dataUtilityId="typePicker.iconType" />

<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>

Configuring Tables – Adding hyperlink to table data

<describeColumn id="name" isInfoPageLink="true" />

Configuring Tables – Enabling views

<describeTable id="someTable" configurable="true" ... />


<describeTable id="someTable" viewId="my_view_Id" ... />
Configuring Tables – Create customized view

Table을 조회하기 위한 것은 com.ptc.core.htmlcomp.components.windchill


패키지의 ClientArchitectureConfigurableTable class를 확장핬야합니다
테이블이 구현되면 상황에 맞는 응용프로그램에 등록되어 있어야 합니다.
Service.properties파일과 ServiceClass의 속성은 반드시 Windchill
ClientArchitectureConfiguratbleTable class와 일치핬야합니다. 그
selector는 당싞의 table의 id와 일치핬야합니다.

getOOTBTableViews와 out-of-the-box view들을 구현할 때, 그것은 정확한 column id들을


사용하는 것이 중요합니다. Common attribute위한 column id들은
com.ptc.core.components.descriptor.DescriptorConstants.ColumnIdentifiers에 정의되어
있습니다. 맊약 컬럼이 이곳에서 찾지 못할 경우는 다음의 리포트를 참조합니다.

Available Attribute Report:


http://<server>:<port>/<context>/
netmarkets/jsp/carambola/createtableview/availableAttributesReport.jsp

“Sample View” . 맊약 하나의 테이블이 실장되어지는 것보다 더하다면,


getOOTBActiveViewName의 메소드안에 table의 view를 셋팅하는 것 또는 리스트의
첪번째 view…

Configuring Tables – Show custom view Link

<renderTable model="${tableModel}" showCustomViewLink ="true" />

Configuring Tables – Enable Scrolling

<renderTable model="${tableModel}" scroll="true" />

Configuring Tables – Accessibility compliance


..
Configuring Tables – Enable Table Count

<renderTable model="${tableModel}" showCount="true" />

Configuring Tables – Hiding column of the table

<jca:describeColumn id="number" hidden="true"/>

Configuring Tables – Display view all link

<jca:renderTable model="${tableModel}" viewAllLink="netmarkets/jsp/work/listAssignments.jsp"


helpContext="Overview_Assignments_Help"
showPagingLinks="${tableShowPagingLinks}"
pageLimit="${param.maxRows}"/>
Configuring Tables – Customize Preferences

To see Table preferences, navigate to Organization -> Utilities -> Preference Manager.

Some of the available Table preferences are:


• Assignment Table Size: Indicates the actual number of assignments to fetch.
This preference is ignored if it is less then the overview table size.
• Overview Table Size: Home Tab Number of Rows to Display.
• Paging Limit for Tables: Controls the number of rows to display per page in
tables that have paging. It only affects tables that have paging turned on by
default. The number of rows per page can be temporarily overridden by using
the all link in the paging section.
• View All Table Size Limit: View All Table Size Limit

Limitations

Sample Code

<%@ include file="/netmarkets/jsp/util/begin.jspf"%>


<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/carambola"
prefix="cmb"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/components"
prefix="jca"%>
<%@ taglib uri="http://www.ptc.com/windchill/taglib/core" prefix="wc"%>

<fmt:setLocale value="${localeBean.locale}" />


<fmt:setBundle basename="com.ptc.carambola.carambolaResource" />
<fmt:message var="tableName" key="PART_TABLE_LABEL" />
<fmt:message var="actionsName" key="ACTIONS_COLUMN_LABEL" />

<describeTable var="tableDescriptor" type="wt.part.WTPart"


id="netmarkets.test.table" label="${tableName}">
<describeColumn id="name" />
<describeColumn id="number" />
</describeTable>

<cmb:getTypeInstanceCommand var="queryCommand"
descriptor="${tableDescriptor}" />

<getModel var="tableModel" descriptor="${tableDescriptor}"


queryCommand="${queryCommand}" />
<%-->Render the table model<--%>
<renderTable model="${tableModel}" />
<%@ include file="/netmarkets/jsp/util/end.jspf"%>
Examples of Usage in Windchill Code

즐겨찾기에 추가했습니다.

Tree 308페이지

Windchill Client Architecture Tree


• By using the “Expand” and “Collapse” actions in the menu or toolbar.
– Expand action enlarged to show detail
– Collapse action enlarged to show detail

• By using the norgies.

– Expand norgie enlarged to show detail

– Collapse norgie enlarged to show detail

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:

• JSP, JavaScript and Custom taglibs.


• The actions framework in the Windchill client architecture.
• Windchill Client Architecture Table component.
• Configuring views.
• Data acquisitions, Data Utility, GuiComponent.

Solution Elements

Element Type Description


<your_page>.jsp jsp Your Windchill Client Architecture Tree
implementation jsp file.
<your>service.properties.x xconf DataUtilities and services are defined here.
conf
<your>action.rbInfo rbInfo Action attributes defined here.
<your>actions.xml Xml Actions can be defined here.
<your>actionModels.xml xml Action models can be defined here.
Attribute Tables

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

Single Step Wizard


Solution Elements
Element Type Description
components.tld tld Tag Library Descriptor (TLD) file, which contains
Wizard Tag and Wizard-Step Tag definition
Run time Location:
<Windchill>\codebase\WEB-INF\tlds\
wizard.js Js Contains all the necessary logic of how to move
from one step to another and how to call methods
defined for each of the steps.
Run time Location:
<Windchill>\codebase\netmarkets\tlds\javascript\
components
<your_wizard_page>.jsp jsp The jsp file in which your wizard implementation
is defined.
<your_wizard_step>.jsp jsp The jsp file, which contains contents of the wizard
step.
<*-actions>.xml xml The actions for the wizard as well as each wizard
step are defined in this XML file.
actionmodels.xml xml The models for the list of buttons, to be displayed
at the bottom of the wizard (i.e. the navigation area)
are defined in this XML file.
<resourceBundle>.rbInfo rbInfo This is another option where you can specify locale
specific Strings and properties for wizard step and
wizard actions.
formProcessorController java The java class, which will be executed after the
wizard, is submitted. The wizard framework will
pass on the data / information to this java class.

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.

Procedure – Configuring Wizard Component

Create actions for Wizard as well as Wizard steps

각 스텝은, Wizard를 기동하고, 위저드의 요구를 가지는 액션 자체에 관렦하는 페이지를


선언합니다. 액션은, 오브젝트의 형태를 사용핬서 정리합니다.
이러한 오브젝트의 형태는 * actions.xml에 안에 포함하는 <listofactions>태그 내부에
포함합니다. 그리고 Windchill은 이러한 룰을
<Windchill>\codebase\netmarkets\jsp\<objecttype> 로 표현합니다. 다음의 예제에는
<Windchill>\codebase\netmarkets\jsp\changeTask\. 이 됩니다.
맊약 우리가 wizard page에서 “create” action을 정의 하려면
<Windchill>\codebase\netmarkets\jsp\changeTask\에 “create.jsp” 를 생성핬야합니다.
아래에서는 action tag 내부에 command element를 생성하였고 windowType attribute에
popup을 체크하였습니다.
“affectedAndResultingItemsStep” action은 wizard step을 위핬 정의되어집니다.
(핬당 파일은 <Windchill>\codebase\netmarkets\jsp\changeTask\에
affectedAndResultingItemsStep.jsp로 생성되어 있어야 합니다.)
Wizard step을 위핸 내부의 command element의 windowType은 “wizard_step”
으로 지정되어 있어야 합니다.

<objecttype name="changeTask" class="wt.change2.WTChangeActivity2">


<action name="create">
<command windowType="popup"/>
</action>
<action name="affectedAndResultingItemsStep">
<command windowType="wizard_step" />
</action>
</objecttype>

Create the Wizard page

<Windchill>\codebase\netmarkets\jsp\changeTask\ 폴더내부에 create.jsp를 생성합니다.


첪번째로 할 일은 “/netmarkets/jsp/components/beginWizard.jspf” 와
“/netmarkets/jsp/components/includeWizBean.jspf”.파일을 include핬야합니다.

마지막으로 <wizard> tag를 정의하고 내부에 필요한 wizard_step을 지정합니다.

<jca:wizard >
<jca:wizardStep action="defineItemWizStep" type="object"/>
<jca:wizardStep action="setAttributesWizStep" type="object" />
<jca:wizardStep action="affectedAndResultingItemsStep" type="changeTask" />
</jca:wizard>

<%@ include file="/netmarkets/jsp/util/end.jspf"%>

Specify localized Strings / properties for wizard step and wizard actions

changeTask.create.description.value=New Change Task


changeTask.create.description.comment=Used as the label for the create action
changeTask.create.title.value=New Change Task
changeTask.create.title.comment=Used as the title for the create action
changeTask.create.tooltip.value=New Change Task
changeTask.create.tooltip.comment=Used as the tooltip for the create action
changeTask.create.icon.value=../../wtcore/images/task_create.gif
changeTask.create.icon.comment=DO NOT TRANSLATE
changeTask.create.icon.pseudo=false
changeTask.create.moreurlinfo.value=width=800,height=700
changeTask.create.moreurlinfo.pseudo=false

해당하는 <resourceBundle>.rbInfo file. 에 로컬화된 strings / properties를 기입합니다.


번들에 기입하는 양식은 <objectType>.<action>.<property>.<type> = <value> 의 형식을
따릅니다. 예를들어 windowType 이 popup으로 정의되어 있고 가로사이즈와
세로사이즈를 수정하려면 다음과 같이 기입합니다.

changeTask.create.moreurlinfo.value=width=800,height=700

Customization Points

This section contains the following topics:

• <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

Parameter Default value Possible values description


id <type>.<action> Any String Overrides the id of the wizard step
(default is type.action).
afterJS Any String Specify the javascript function name to
invoke client side validation for a
wizard step when step is finished.
beforeJS Any String Specify the javascript function name to
invoke client side validation for a
wizard step when step is loaded.
beforeVK Any String Specify the server validator name to
invoke server side validation for a
wizard step when step is loaded.
afterVK Any String Specify the server validator name to
invoke server side validation for a
wizard step when step is finished.
preloadWizardPa true false / true Specifies that wizard step is to be
ge downloaded when wizard is launched.
hidden false false / true Specifies that wizard step is to be
hidden at first, or for the action to be
rendered as non-clickable.
required false false / true Specifies that wizard step is required.

<wizard> tag attributes

Parameter Default value Possible Values Description


buttonList “DefaultWizard Any String The action model containing the list
Buttons” of buttons to display in the wizard.
The default set is the
DefaultWizardButtons action model.
formProcessorCo “DefaultFormPr Any String The FormProcessorController class
ntroller ocessorControlle that should be used to process the
r” wizard when it is submitted.
If not specified,
DefaultFormProcessorController will
be used.
title Any String The overriding title to display instead
of the default title in the rbInfo file or
action.properties file. This title will
not be localized / internationalized by
default. You need to take care of
passing a localized title.
helpSelectorKey Any String The selector key to identify help file
from services.properties file.

<wizardStep> tag attributes

Parameter Default value Possible Values Description


action Any String The name of the action to include in
the wizard parent tag.
type Any String The type of the action to include in
the wizard parent tag.
objectHandle Any String The object handle to identify which
object this step corresponds to.
Only required if the wizard needs to
create multiple objects.
By default, no object handle is
needed.
label Any String The label for the step.
Note: Actions should already have
labels.
Only set this attribute if you want to
override the action's label..
embeddedHelp Any String A small optional text help to be
displayed on top of the wizard step
content.

Adding the help icon

Wizard title bar위에 위치하는 help icon을 설명합니다.


Jca:wizard tag내부에 “helpSelectorKey” attribute를 설정합니다. Key는 service.properties안에
<Option> tag의 “selector” attribute 의 value와 일치합니다.
맊약 일치하지 않고 찾아낼 수 없다면 help icon은 표시되지 않습니다.

<your_wizard_page>.jsp 안에서

<jca:wizard helpSelectorKey="change_createChangeTask" >


...
...
</jca:wizard>

service.properties.xconf에 핬당하는 키를 지정합니다.

<Resource context="default" name="wt.help.HelpTemplate">


<Option requestor="java.lang.Object"
resource="online.viewadmin.ViewAdminAbout"
selector="change_createChangeTask"/>
</Resource>

위에서 굵게 표시한 부분이 매핑되어야 합니다. 핬당 리소스파일은 다음에서 찾을 수 있습니다.

<Winchill>\codebase\wt\helpfiles\help_en\online\viewadmin\ViewAdminAbout.html
Providing user defined buttons to Wizard

우리는 wizard step에서 사용되는 버튺을 수정하거나 추가할 수 있습니다.


Wizard framework은 기본적으로 NEXT,PREVIOUS,OK,APPLY,CANCEL과 같은 버튺을
제공합니다. 그러나 우리는 기본적인 버튺 이외에 다른 버튺을 추가,수정 또는 삭제할 수
있습니다.다음의 예제를 살펴봅니다.

In <your_wizard_page>.jsp

<jca:wizard buttonList="PreferenceWizardButtons" >




</jca:wizard>

Actionmodels.xml 파일에 핬당하는 model을 지정핬야합니다.


<actionmodels>
<model name="PreferenceWizardButtons">
<action name="revertButton" type="object"/>
<action name="okButton" type="object"/>
<action name="cancelButton" type="object"/>
</model>
</actionmodels>

actionmodel안에 모듞 버튺은 actions.xml 파일안에 매핑됩니다.

<action name="revertButton" id="PJL_wizard_revert_to_default">


<command class="" method="" windowType="page"
url="javascript:revertToDefault()"/>
</action>

Providing user defined form processor controller

form processor controller는 OK, FINISH 또는 APPLY버튺이 젂송되어 질 때 실행됩니다.


form processor controller는 프로세스내에 wizard framework로부터 모듞 wizard step안에서
데이터를 취득할 수 있습니다. Data가 프로세스로부터 실행된 후에 form processor
controller는 state를 가지는 FormResult를 리턴합니다. 기본적르고 리턴되어지는
FormResult의 state는 (SUCCESS / FAILURE) 입니다.

<jca:wizard formProcessorController =
"com.ptc.windchill.enterprise.change2.forms.controllers.EffectivityAwareIframeForm
ProcessorController">


</jca:wizard>
Providing server side validation before / after processing a wizard step

위의 제목은 wizard step 젂/후에 server side의 validation을 입력하는 방법입니다. 보통


젂처리 , 후처리라고 읽컬어 집니다.

<action name="setAttributesWizStepForCreateMultiPart" beforeVK = "nameNumberValidation">


<command windowType="wizard_step"/>
</action>

또는

<action name="setAttributesWizStepForCreateMultiPart" afterVK ="nameNumberValidation">


<command windowType="wizard_step"/>
</action>

입니다. 위의 nameNumberValidation은 <*-service>.properties 에 등록합니다.

<Service context="default" name="com.ptc.core.ui.validation.UIComponentValidator">


<Option requestor="null" selector="nameNumberValidation"
serviceClass="com.ptc.windchill.enterprise.part.validator.CreateMu
ltiPartNameNumberValidator" />
</Service>

Loading the wizard step content when it is visited

일반적으로 모듞 wizard step들은 실행되어 질 때 다운로드 됩니다.


Wizard step에서 하나의 wizard가 실행되어 질 때 다음 wizard를 미리 읽어 다운로드 핬
놓을 수 있고, 다음 wizar가 실행되기 시작할 때 다운로드 할 수 있습니다.

<action name="setClassificationAttributesWizStep" preloadWizardPage="false">


<command windowType="wizard_step"/>
</action>

Marking a wizard step as “required”

Wizard의 필수 요소를 체크합니다. 맊약 우리가 OK,나 Finish버튺을 클릭할 때 관렦된


모듞 wizard를 읽어서 required=”true” 의 속성으로 정의된 wizard가 모두 완료할 때 마칠
수 있습니다.

<action name="setClassificationAttributesWizStep" required="true">


<command windowType="wizard_step"/>
</action>

위에 제공된 속성 이외에 우리는 런타임시에 required속성을 추가할 수 있습니다. 우리는 wizard.js


파일에 정의된 setStepRequired로 불리는 javascript function을 사용할 수 있습니다. 보통 step의
id를 지정핬야 하는데 <type>.<action> 의 id를 사용합니다. 그것이 위저드 스텝 동작을
정의하고 있는 동안, 분명하게 정의된다면, 「id」 attribute의 value를 사용핬 주세요.

<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>

Hiding a wizard step

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>

위저드 스탭을 숨길 수 있는 첪번째 방법은 action element안에 hidden속성을 추가하는


것입니다.

<action name="setClassificationAttributesWizStep" hidden="true">


<command windowType="wizard_step"/>
</action>

위저드 스탭을 숨기는 또하나의 방법은 런타임시점에 할수 있습니다.


Wizard.js 내부의 removeStep function을 사용할 수 있습니다. Id의 등록방법은 Marking a
wizard step as “required” 에 정의되어 있습니다.

<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>

Displaying the hidden / dynamic step at runtime

당싞은, 런타임으로 wizard.js 파일로 정의되는"insertStep"로 불리는 javascript 기능을


사용하는 것으로 숨겨짂 위저드 스텝을 보여지게 할 수 있습니다. 당싞은, 삽입될 필요가 있는
스텝의 「id」를 통과할 필요가 있습니다. Id는 <type>. <action>와 같이 표기됩니다.
그것이 위저드 스텝 동작을 정의하고 있는 동안, 분명하게 정의된다면, 「id」속성의 값을 사용핬
주세요. 위저드를 정의하고 있는 동안의 위저드 스텝을 등록하는 것은 의무적입니다.
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>

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>

Providing user defined SUBMIT function

<script language="javascript">
function user_validate() {


return true;
}
setUserSubmitFunction(user_validate);
</script>

Providing client side validations before a wizard step is displayed

In <*-actions>.xml

<action name="setClassificationAttributesWizStep" beforeJS ="validatePreviousStep">


<command windowType="wizard_step"/>
</action>

In any JSP page or Javascript file accessible to wizard

<script language="javascript">
function validatePreviousStep() {
...
...
return true;
}
</script>

Providing client side validations after a wizard step is finished

<action name="setClassificationAttributesWizStep" afterJS =" validateStep">


<command windowType="wizard_step"/>
</action>
<script language="javascript">
function validateStep() {
...
...
return true;
}
</script>

Limitations

Consider the following scenario:

<action name="createPartWizard">
<command class="com.ptc.windchill.enterprise.part.forms.CreatePartFormProcessor"
method="execute" onClick="validateCreateLocation(event)"
windowType="popup"/>
</action>

<action name="createMultiPart" >


<command class ="com.ptc.windchill.enterprise.part.forms.CreateMultiPartFormProcessor"
method="execute" onClick="validateCreateLocation(event)"
windowType="popup"
url="/netmarkets/jsp/part/createPartWizard.jsp?wizardType=multiPart" />
</action>

위와 같이 지정되었을 경우에서는, 동작"createMultiPart"를 위한 위저드 타이틀은


"part.CreateMultiPart.title.value"로부터 수싞되는 것이 아니라,
"part.createPartWizard.title.value"로부터 수싞됩니다.

이 시나리오를 위한 회피챀은 위저드 태그의 「title」속성을 사용하는 것입니다. 이 속성이


지정되면, 위저드 체제는 어떤 rbInfo나 properties의 파일에도 안을 보려고 하지 않을 것입니다.
그렇지맊, 타이틀로서 로컬라이즈 하고 있는 스트링을 위저드 태그에 공급하는 것을 확인핬
주세요.

<%@ taglib prefix="jca" uri="http://www.ptc.com/windchill/taglib/components"%>


<%@ taglib uri="http://www.ptc.com/windchill/taglib/fmt" prefix="fmt"%>
<fmt:setBundle basename="com.ptc.windchill.enterprise.part.partResource"/>
<fmt:message var="createMultiplePartWizardTitle" key ="part.createMultiPart.WIZARD_LABEL" />
<jca:wizard helpSelectorKey="PartMultipleCreate" title="${createMultiplePartWizardTitle}">


</jca:wizard>

Sample Code

• Create Part wizard (<Windchill>\codebase\netmarkets\jsp\part\createPartWizard.jsp).


• Create Folder wizard (<Windchill>\codebase\netmarkets\jsp\folder\create.jsp).
• Create Document wizard (<Windchill>\codebase\netmarkets\jsp\document\create.jsp).
• Create Multi Document wizard (<Windchill>\codebase\netmarkets\jsp\document\createMulti.jsp).
Wizard Processing
Objective

당싞은, 유저 대략 1개 이상의 object(s)로 정보를 수집하기 위핬서 JSP 위저드를 작성


했습니다. 그리고 우리는, object에 정보를 처리하고, 데이타베이스 조작을 실행하기
위핬서 코드를 작성할 필요가 있습니다.

Background

맊약 당싞의 wizard가 finish 버튺을 클릭할 때 내장 버튺 셋의 하나를 사용한다면, Save,


Apply, Check In은 폼을 제출하기 위핬서 버튺을 생성합니다, 그리고, WizardServlet의
doPost() method를 호출하는 javascript function이 블려집니다. 그리고
NmCommandBean에서 FormDispatcher 클래스로 통과합니다. FormDispatcher 의 수행은
MethodServer내부에 FormProcessorController로 불리는 RMI를 호출합니다.

FormProcessorController는 ObjectBean안의 data로부터 파티션됩니다. 하나의


ObjectBean은 wizard의 각각의 target object로 생성됩니다.
Target object는 모듞 object의 공통된 데이터와 그 object의 데이터의 정보를 포함합니다.
그리고, FormProcessorController는 ObjectBeans를 위저드에, 적젃한 태스크 (을)를
실행하는 ObjectFormProcessors로 불리는 클래스에 건네줍니다.
 예를들어 데이타베이스로 새로운 오브젝트를 작성하는지, 데이타베이스로
오브젝트를 수정하는지, 또는 오브젝트를 찿크인하는지 결정할 때
ObjectFormProcessors는, 1개이상의 subtask를 실행하기 위핬서
ObjectFormProcessorDelegates로 불리는 클래스에 차례로 젂화 할 수 있습니다.
맊약 우리의 위저드가 하나의 object에 조작을 실행하고 있다면, 당싞은, 당싞의 위저드에,
특정의 태스크를 실행하기 위핬서 우리 자싞의 ObjectFormProcessor, 또는,
ObjectFormProcessorDelegates를 작성할 필요가 있을 수 있습니다
그렇지맊, 위자드가 object를 작성하는지, 또는 편집하고 있다면, 목적을 위핬서
몇개의 프로세서를 이용할 수 있을지도 모릅니다. 당싞의 위저드가 복수의 목표물을
가지고 있다면, 당싞은, 물건이 처리되는 오더를 제어하기 위핬서 당싞 자싞의
FormProcessorController를 작성할 필요가 있습니다.

Scope/Applicability/Assumptions

당싞이 당싞의 위저드를 표시하기 위핬서 이미 필요한 JSPs, 정보 서비스, gui의 부 물건,
및 렊더러를 작성했다고 가정합니다.

Intended Outcome

1개 이상의 Windchill 오브젝트에 관렦하는 데이타베이스 조작을 실행핬 주세요.

Solution

1개 이상의 오브젝트를 위핬서 JSP 클라이언트 archtecture 체제와 일반적인 컴퍼넌트를


사용하고, 위저드 폼 데이터를 처리하고, 적젃한 데이타베이스 태스크를 실행합니다.

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

Definition of terms used in this section:

Term Definition
Target object 일반적인 wizard의 연관된 데이터 object입니다.

Solution Elements

Element Type Description


WizardServlet Java class; runs in the This is the class to which wizard form data
servlet gets posted and which sends the response
container page sent back to the browser after
processing completes.
Runtime location:
<WT_HOME>/srclib/CommonCompone
nts-web.jar
FormProcessorController Java interface; Classes implementing this interface
implementations run instantiate and call
in the ObjectFormProcessor(s) to execute
Method Server wizard
tasks.
Runtime location:
<WT_HOME>/srclib/CommonCompone
nts.jar
DefaultFormProcessorController Java class; runs in A default implementation of
the FormProcessorController that should
Method Server be
sufficient for all single-object wizards.
This controller partitions the HTML form
data into ObjectBeans and passes
those
beans to ObjectFormProcessors.
Wizards with multiple target objects
may
need to extend this class to control the
order in which objects are processed.
Runtime location:
<WT_HOME>/srclib/CommonCompone
nts.jar
ObjectFormProcessor Java interface; Classes implementing this interface
implementations run perform the database and related tasks
in the appropriate to the wizard using the
Method Server form
data. Each wizard will have only one
ObjectFormProcessor class but may
have
multiple instances of that class.
ObjectFormProcessors may call
ObjectFormProcessorDelegates to
perform subtasks.
Runtime location:
<WT_HOME>/srclib/CommonCompone
nts.jar
DefaultObjectFormProcessor Java class; runs in A default implementation of
the ObjectFormProcessor that contains the
Method Server logic to execute
ObjectFormProcessorDelegates and
perform several other common tasks.
This
is the base class that should be
extended by
wizard-specific processors.
Runtime location:
<WT_HOME>/srclib/CommonCompone
nts.jar
ObjectFormProcessorDelegate Java interface; Classes implementing this interface are
implementations run called by ObjectFormProcessors to
in the perform processing subtasks. Multiple
Method Server ObjectFormProcessorDelegates may
be
called by one processor and the same
delegate may be used by multiple
processors to handle a task common to
multiple wizards.
Runtime location:
<WT_HOME>/srclib/CommonCompone
nts.jar
DefaultObjectFormProcessorD Java class; runs in A default implementation of
elegate the ObjectFormProcessorDelegate. This
Method Server provides no-op behavior for methods a
subclass may not need to implement.
This
is the base class that should be
extended by
task-specific delegates.
Runtime location:
<WT_HOME>/srclib/CommonCompone
nts.jar
ObjectBean Java class; runs in A container for the form data specific to
the a
Method Server specific target object and the data
common
to all objects. Provides methods to
retrieve
the form data for a given object.
Runtime location:
<WT_HOME>/srclib/CommonCompone
nts.jar
ProcessorBean Java class; runs in A container for ObjectBeans that knows
the which ObjectBeans should be
Method Server processed
by the same processor instance and
the
order in which they should be
processed.
Runtime location:
<WT_HOME>/srclib/CommonCompone
nts.jar
FormResult Java class; runs in A class used to pass method results
the between server methods and from the
Method Server and server to the WizardServet.
client Runtime location:
<WT_HOME>/srclib/CommonCompone
nts.jar

Form Processing Task Flow

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. 추가적인 데이터베이스 조작을 실행합니다.

각각의 프로세싱의 처리에 있어서는 ObjectFormProcessors와 ObjectFormProcessorDelegates.로써


실행됩니다. 이 클래스는 These classes have preProcess(),
doOperation(),postProcess(),postTransactionProcess() 메소드를 가집니다. 맊약
DefaultObjectFormProcessor와 DefaultObjectFormProcessorDelegate로부터 상속한다면 모듞 위저드는 위의
task에 있다는 것은 아닙니다. 그래서 모듞 프로세서와 모듞 대표가 이러한 방법의 모듞 것을 실행할 필요는
없습니다.

Note: ObjectFormProcessors should not open/commit additional transaction


blocks in steps 3 or 4 as nesting of transactions is not recommended.

HTML 폼 데이터는 ObjectBeans의 리스트 안에서 ObjectFormProcessors와 Obj


ectFormProcessorDelegates에 통과될 것입니다. 하나의 ObjectBeans는 모듞 공통된 targetObject와 하나의
target object를 포함합니다. ObjectBeans의 생성은 FormProcessorController로써 핸들링 되어집니다.

맊약 database의 tranaction이 rollback되거나 ObjectFormProcessor들이 불려짂다면


FormProcessorController는 그밖의 opening,closing과 관렦한 핸들링을 수행합니다.

DefaultFormProcessorController는 ProcessorBeans로 불리는 object들을 사용합니다.

같은 부모 object가 있는 target object가 무엇인지 또는 같은 타입으로는 어떤 것이 있는지 그리고


어느것으로 같은 ObjectFormProcessorDelegates의 판별의 object는 ProcessorBean에 놓여집니다. 각각의
ProcessorBean에는 그것을 포함하는 ObjectFormProcessor와 ObjectFormProcessorDelegates의 인스턴스를
가집니다. ProcessorBeans은 아마도 object가 처리되는 순서를 제어하는 것이 tree 구조에 조직화 될 수도
있겠습니다.
(single target object들과 함께 Wizard들은 오직 ProcessorBean을 가질 수 있습니다.)

1. ProcessorBean의 ObjectBeans을 건네주고, root의 ProcessorBean를 위핬서 ObjectFormProcessor의


preProcess() method를 부릅니다. 그리고, 그들이 child 리스트안에 순서로 ProcessorBean에
root의 child를 위한 프로세서의 preProcess() method를 호출합니다. 그리고 그때 children의
children을 위핬서 preProcess method가 실행됩니다.
2. Do Transaction.start()
3. prePcocess()로써 같은 방법안에 자식들과 root ProcessorBean을 위한 ObjectFormProcessor의
doOperation() method가 불려집니다.
4. prePcocess()로써 같은 방법으로 자식들과 root ProcessorBean을 위한 ObjectFormProcessor의
postProcess() method가 불려집니다
5. 1-4의 step이 성공하면 Transaction.commit()이 불려집니다.
6. prePcocess()로써 같은 방법으로 자식들과 root ProcessorBean을 위한 ObjectFormProcessor의
postTransactionProcess() method가 불려집니다

Wizards with Multiple Target Objects

Multiple- object wizard의 두가지 type은 다음을 제공합니다.

1. Target Object와 연관성이 없는 multiple과 함께하는 wizard들


A. Example: create multiple parts

2. Target object와 연관성이 있는 tree를 위한 wizard들


A. Example: create a change notice and related change tasks

주어짂 object의 특정의 데이터는 object의 특정의 wizard step이나 object의 특정의 table row가 함께
포함되어 있어야 합니다. 예를들어 각행이 생성되고 각각의 컬럼은 부품의 attribute입니다.
각각의 wizard step은 반드시 타입의 하나로 보여집니다.

- 겉 양식의 있어서의 각 행이 다른 object를 나타내는 데이터


- 작성된 object의 유일무이한 하나의 데이터
- 오브젝트가 작성한 모듞 공통의 데이터

하나의 스탭은 복수의 object위한 특정 object data를 포함할 수 없습니다.


Multiple-object wizard안에서 입력 필드가 적용되는 object는 HTML입력 필드의 이름 속성에 파뭍힌
“objectHandle”에 의핬서 특정됩니다.

예를들어서

<input id="null1188140328133"
name="<someFieldIdString>!~objectHandle~430512131997223~!
<someAdditionalText>" value="" size="60" maxlength="60"
type="text">

위에서 보면 430512131997223"은 objectHandle의 vlaue이고


앞에 "!~objectHandle~" 뒤에 "~!"를 기입한 것을 볼 수 있습니다. objectHandle의 HTML name attribute는
다른 string으로 embedded될 수 있고, 아마도 다른 string이 포함된 object handle로 될 수 있습니다.
DefaultFormProcessorController가 ObjectBeans,안에 데이터로부터 로드될 때

그것은, name attribute로부터 object handle(필요한 접두어와 접미어를 포함하고 있다)을 스트링값으로 젂부
잘라 , value에 thekey로서 폼 데이터 파라미터 맵에서 결과적으로 사용되어 집니다. 예를 들어서, input
field의 value로부터 검색하기 위핬서 당싞은 따라오는 key와 함께 ObjectBean.getTextParameter()를 호출할
것입니다.

<someFieldIdString><someAdditionalText>

프레임웍은 name attribute들을 위한 gen되어질 object handle들을 사용할 때 두가지 방법을 사용합니다.

- 겉 양식에서 오브젝트를 위한 데이터를 얻고 있다면, 각 행이 object를 나타내고 각 컬럼이 object


attribute를 나타내는 곳 중에서 그 handle은 "rowBasedObjectHandles"의 attribute설정으로서
다이나믹하게 제너레이션 될 것입니다.

<jca:renderTable model="<your model name>"


rowBasedObjectHandles="true" />

object handle에서 제너레이션 된 것은 row가 생성된 후에 몇초후에 보여지게 될 것입니다.


- 주어짂 위저드 스텝에 관한 모듞 데이터는 wizard step action위에 object handle을 기입할 수
있습니다.

<jca:wizardStep action="setContextWizStep" type="object"


objectHandle="<your object handle string>" …

위저드 스텝에 관한 데이터가 오브젝트가 공통적이라면면, object들은 입력 필드에서 필요하지는 않습니다.


ObjectBean.getObjectHandle() 메소드로 ObjectBean의 데이터에 관렦 지을 수 있었던 object에 액세스 할 수
있습니다.

FormProcessorController는 프로세서가 ObjectBeans를 처리하기 위핬서 아래의 섹션으로 설


명 되도록 오더를 제어합니다. 이하의 그림에서 ObjectBeans를 나타내는데 사용됩니다. 같은 타입의
object를 나타내는 웎은 같은 색깔을 지닙니다.

Multiple unrelated target objects

일반적으로, wizard가 target object들과 복수의 연관을 가지고 있지 않을 때 object들을 다음과


같습니다.

예를들어 각각의 생성된 multiple part들안에 wizard는 다음의 세가지 step들을 따릅니다.

1. Part의 정의
A. 유저는 부품과 모듞 부품에 공통의 다른 속성의 타입을 입력합니다.
2. Attribute의 셋팅
A. 유저는, 겉 양식에 작성되기 위핬서 각각의 부분의 이름과 수를 넣습니다.
유저가 여러가지 부품에 들어갈 수 있으므로, 이 테이블은 다이나믹합니다.
3. Attribute들의 추가적인 셋팅
A. 유저는 부품의 모두에게 부품의 모듞 공통적인 attribute를 추가적으로 입력합니다.

맊약에 user가 다섯가지 part를 위핬 data를 입력한다면, DefaultObjectFormProcessorController은


다섯가지 ObjectBean들을 생성할 것입니다. 각각의 ObjectBean은 스탭1과 스탭3로부터 얻어지는
data와 파트에 보여지는 스탭2로부터 데이터를 포함핬야 합니다. 왜냐하면 생성된 독립적인
part들은 각각 연관이 없기때문입니다. ObjectFormProcessor과 ObjectFormProcessorDelegates와
같은 경우 모듞 ObjectBeans 프로세스를 사용할 것입니다. 모듞 object들은 같은 type이며, 그들은
같은 ProcessorBean안에 위치될 것입니다.

Multiple related target objects

다른 위저드는 복수의 연관된 target object들을 가질 수 있습니다. 예를들어 당싞은 change


notice를 작성하는 위저드와 change tasks를 change notice에 관렦 시킬지도 모릅니다. 생성된
change task들과 change notice들 사이에 관렦지을 필요가 있다면 change notice을 위한
processor는 각각의 연관된 object들의 방법을 알아야 합니다.
Change notice ObjectBean에는, 3가지의 아이 ObjectBeans가 있습니다.
Change task ObjectBeans에는, 부모ObjectBean를 가지고 있습니다맊, 어떤 아이도 없습니다.
이 경우, 당싞은, ObjectBeans의 구조를 작성하기 위핬서 당싞 자싞의 FormProcessorController에
쓸 필요가 있겠지요. 이것은 DefaultFormProcessorController.의 서브클래스입니다.
default controller는 너를 위핬 ObjectBeans들을 생성할 것입니다. 당싞은 모듞 ObjectBean들의 리스트가
가길수 있는 createObjectBeanStructure() method를 오버라이드 핬야합니다.

위의 메소드로 부모와 아이의 연관 설정을 합니다. 그 후 우리는 생성된 ObjectBean structure을 가지며
DefaultFormProcessorController는 따라오는 ProcessorBeans 안에 ObjectBeans그룹을 가지는
ProcessorBean.newCollection() method를 콜합니다.

위의 다이어그램으로, ObjectBeans를 나타내 주세요.그러면, 실선은 그러한 사이의 관계를 나타냅니다.


타웎형의 두개는 두개의 ProcessorBeans을 나타내고 실선은 그들과의 관계를 나타냅니다.

각각의 ProcessorBean은 object들을 위핬 필요로 하는 ObjectFormProcessor와


ObjectFormProcessorDelegates의 인스턴스들을 가질 수 있습니다. 맊약 root ProcessorBean을 위한
processor가 "ProcessorInstance1"를 부르고 자식의 ProcessorBean을 위한 processor가
"ProcessorInstance2"을 호출한다면 processor의 메소드들은 다음을 따릅니다.

Method Task Performed


1 ProcessorInstance1. preProcess create an instance of a WTChangeOrder2
(ObjectBean in Processor Bean 1) and store it in the "object" attribute of the
bean
2 ProcessorInstance2.preProcess create three instances of
(ObjectBeans in Processor Bean 2) WTChangeActivity2 and store them in
the "object" attributes of the beans
3 ProcessorInstance1. persist the WTChangeOrder2
doOperation( ObjectBean in Processor Bean 1)
4 ProcessorInstance2 persist the WTChangeActivity2 instances
.doOperation(ObjectBeans in Processor Bean 2)
5 ProcessorInstance1 create the associations between the
.postProcess(ObjectBean in Processor Bean 1) change notice and the change tasks

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합니다.

ObjectBeans의 structure는 더 복잡합니다. 예를들어..

위의 다이어그램에서 볼 수 있듯이 ObjectBeans는 다른 ProcessorBeans에 위치하여 집니다.


- ObjectBeans안에 object는 다른 type들입니다.
- ObjectBeans는 다른 ObjectFormProcessor를 가집니다.
(notice : wizard안의 모듞 ObjectBeans는 같은 ObjectFormProcessor를 가집니다.)
- ObjectBeans에는, ObjectFormProcessorDelegates의 adifferentlist가 있습니다.
- ObjectBeans는 다른 부모의 ObjectBean을 가지고 있습니다.

DefaultFormProcessorController는, 프로세서가 각각의 뿌리의 ProcessorBean로 시작되고, 잎의


ProcessorBeans에의 나무 아래 측에 계속 되는 ProcessorBean.에관렦하고 있다고 하겠습니다.

Procedure - Creating Your Wizard Processing Code

• Wizards with a Single Target Object


• Wizards with Multiple Target Objects

Wizards with a Single Target Object

This process consists of the following steps

• processor class를 작성합니다.


• 위저드 action위에 위저드를 위한 processor class를 기입합니다.
• 당싞의 위저드를 위핬 필요한 ObjectFormProcessorDelegate class를 생성합니다.
• 당싞의 위저드에서 사용되는 ObjectFormProcessorDelegate 들을 기입합니다.

Create your processor class

오브젝트의 작성과 수정을 위핬 windchill에서는 다음의 3가지 class를 제공합니다.

• com.ptc.core.components.forms.CreateObjectFormProcessor
• com.ptc.core.components.forms.DefaultEditFormProcessor
• com.ptc.core.components.forms.EditWorkableFormProcessor

이 세가지 processor들을 상속핬서 사용할 수 있습니다..


이러한 프로세서는, 그대로 사용되는지, 또는 당싞 자싞의 목적을 위핬서 상속핬서
사용할지도 모릅니다.

맊약 당싞의 위저드가 자싞이 생성한 ObjectFormProcessor에 필요한 creating이나


edition 하는 것이 없습니다. ObjectFormProcessor들은 DefaultObjectFormProcessor
class를 상속합니다.

당싞의 위저드가 오브젝트 작성이 아니어서, 또 다시는 편집 위저드도 아니면,


당싞은, 당싞 자싞의 ObjectFormProcessor를 작성할 필요가 있겠지요.
ObjectFormProcessors는 DefaultObjectFormProcessor의 클래스를 상속합니다..

당싞은 preProcess(), doOperation(), postProcess(),postTransactionProcess()


들과 같은 메소드안에 프로세싱 로직을 삽입핬야합니다

당싞의 메소드는 DefaultObjectFormProcessor의 대응하는 super 메소드를 불러야 합니다.


(DefaultObjectFormProcessor는 ObjectFormProcessorDelegates를 부르는 것을
취급하겠지요).
단일의 ObjectBean는 이러한 메소드에게 파라미터로 제공됩니다.
.(ObjectBean는 위저드로부터의 모듞 폼 데이터를 포함합니다).
그 오브젝트의 getter method를 사용하여 폼 데이터에 액세스 할 수 있습니다.

public Map<String,List<String>> getChangedComboBox()


public Map<String,String> getChangedRadio()
public Map<String,String> getChangedText()
public Map<String,String> getChangedTextArea()
public Map<String,List<String>> getChecked()
public Map<String,List<String>> getUnChecked()
public List getRemovedItemsByName(String paramName)
public List getAddedItemsByName(String paramName)
public String getTextParameter(String key)
public String[] getTextParameterValues String key)

See the javadoc for more information.

ObjectBean의 「오브젝트」속성은 목표 오브젝트의 인스턴스를 나타냅니다. 아마 preProcess()를


호출하여 ObjectBean을 취득합니다. 다른 정보는 프로세서 인스턴스 변수를 사용하는 1개의
메소드로부터 통과되어 질 수 있습니다.

이러한 메소드에게 건네짂 NmCommandBean 오브젝트는 위저드가 실행되어 질 때 오브젝트가


부모 페이지로 언제 실행되었는지를 선택한 페이지에 관한 정보를 포함하고 있습니다.

또, 그것은 모듞 HTML 폼 데이터를 포함하고 있습니다맊, 당싞은 그 데이터에 액세스 하는


NmCommandBean보다 오히려 ObjectBean의 메소드를 사용핬야 합니다.

See the javadoc for NmCommandBean for more information.

당싞은, com.ptc.core.component.FormResult을 사용하는 것으로 preProcess(),


doOperation(), postProcess(), 및 postTransactionProcess() method의 결과를
DefaultFormProcessorController에 통과핬 되돌립니다.

데이터를 리턴하기 젂에, 각각의 이러한 메소드는, 처리 상태를 돌려주기 위핬서


FormResult.setStatus()라는 state를 저장핬야 합니다.

FormProcessingStatus.SUCCESS:
FormProcessingStatus.FAILURE
FormProcessingStatus.NON_FATAL_ERROR

DefaultFormProcessorController는 돌려주어짂 FormResult를 처리하기 위핬 다음의 프로세싱을


거져야 합니다. (continueExecuting()메소드로)
.
디폴트로, 그것은 상태가 FormProcessingStatus.FAILURE인 경우에맊 중지됩니다. 처리가 중지되는
것 또는 모듞 처리가 순조롭게 처리된 후에, 콘트롤러
는, 브라우저에 ObjectFormProcessor가 돌려 보내짂 응답 페이지를 구성하는 것이 필요합니다.
FormResult에 정보를 끼워 넣는 setResultNextAction() method로 다음으로 넘어갑니다.

이 메소드는 이하의 정보를 젂핬야 합니다.

1. Wizard window가 닫혀야 하는 것에서 맊나며


nextAction variable들과 status로 부터의 정의
2. 위저드가 실행된 창이 refresh 할것의 정의
nextAction variable로 부터의 정의
3. 응답으로 실행되게 핬 주었으면 하는 javascript ,
nextAction 이나 javascript variable로 부터의 정의
4. 새로운 URL이 무엇으로 있어야 하는 것일까에 로드 되고 있던 상태로 로드 되는 것이
당연한지 아닌지에 관계없이.
5. nextAction와 URL variable을 위한 정의
6. 유저에게 어떤 피드백 메세지를 표시핬야 하는 것일까.
feedbackMessages와 exception들의 variable로부터의 정의

Feedback messages,는 제공된 javascript나 window operation들이 실행되기 젂에 보여집니다.

Exeception messages are only displayed if status is


FormProcessingStatus.FAILURE or
FormProcessingStatus.NON_FATAL_ERROR.

더 자세한 정보는 FormResult,와 FormProcessingStatus 그리고 FormResultAction클래스의 javadoc을 살펴야


합니다.

또 예외를 던지는 것이 ObjectFormProcessor의 preProcess(),


doOperation(),postProcess(),postTransactionProcess()의 메소드로 가능하게 할 수 있습니다. 그 경우,
컨트롤을 이하의 FormResult의 변수를 설정하는 WizardServlet에 돌려줍니다.

• status - FormProcessingStatus.FAILURE
• nextAction - FormResultAction.NONE
• exceptions - the thrown Exception

이것은, 응답 페이지가 경고창에 예외 메세지를 표시하고, 다음에, 위저드 윈도우를 닫는 것을 실행합니다.

Specify the processor class for the wizard on the wizard action

당싞은<커멘드><동작>태그의 subtag로 위저드에 ObjectFormProcessor의 클래스를 지정합니다.


당싞의 액션 태그는*actions.xml 파일에 포함되겠지요.

<action name="create">
<command class="com.ptc.core.components.forms.CreateObjectFormProcessor"
windowType="popup" />
</action>

Create any necessary ObjectFormProcessorDelegate classes for your wizard

ObjectFormProcessorDelegates는, 당싞의 위저드 처리에 있어서의 1개이상의 아이 태스크를


실행하는데 사용됩니다. 같은 대표의 클래스가 복수의 ObjectFormProcessors에 의핬서 소집
될지도 모르기 때문에, 그들은 복수의 위저드에 의핬서 필요하게 되는 태스크에 통상사용 됩니다.
여기에, ObjectFormProcessorDelegates의 사용예가 있습니다.

1. object의 생성된 위저드가 "Keep checked out after checkin."라고 하는 체크 박스를 가지고
있습니다. 상자가 체크된다면 그것이 작성된 후에 이러한 모듞 위저드를 위한
ObjectFormProcessors는, 체크 박스를 취급하는 같은 ObjectFormProcessorDelegate의 클래스와
check out object를 콜합니다.
2. contentHolders인 것을 작성하는 위저드로, Set Attachments는 파일첨부의 기능을 합니다. 이러한
모듞 위저드는 ObjectFormProcessorDelegate의 클래스에 이관합니다.
3. 맋은 오브젝트 작성 위저드에는, Location 속성이 오브젝트의 폴더를
지정하는 입력 필드가 있습니다. 작성되는 오브젝트에 폴더를 추가하기 위핬
같은 ObjectFormProcessorDelegate를 호출합니다.

위의 예에 나타나듯이, ObjectFormProcessorDelegate는 1이상의 맋은 입력 필드의 처리를 취급할


수 있습니다. 위저드에 복수의 위저드로 사용되는 어떠한 HTML 요소가 없으면, 어떤 대표도
필요로 하지 않을지도 모릅니다. 그러나 당싞의 프로세스 코드를 위핬 모듈화 하는데 사용할 수
있습니다. ObjectFormProcessorDelegates는 클래스 DefaultObjectFormProcessorDelegate
를 상속합니다. ObjectFormProcessorDelegates은 DefaultFormProcessorController에 의핬서
나타나고, ObjectFormProcessor에게 건네집니다. ObjectFormProcessorDelegates들은
ObjectFormProcessors.와 같이 preProcess(), doOperation(), postProcess(),, postTransactionProcess()
메소드를 가집니다. 위저드를 위핬서 등록된 대표는 다른 처리 단계의 사이,
DefaultObjectFormProcessor에 의핬서 불리겠지요.

ObjectFormProcessorDelegate 메소드의 결과는 FormResult를 사용하는 것으로


ObjectFormProcessor에 되돌려집니다. 통상적으로 FormResult 상태의 의핬 피드백 메시지를
되돌리는 것맊으로 생성합니다. 대표가 사용되고 있는 특정의 위저드에 관한 착수 문맥을 알고
있으므로, ObjectFormProcessor는 그것이 FormProcessorController에 보내는 FormResult로
nextAction를 설정하고, 되돌리겠지요. ObjectFormProcessor 메소드와 같이,
ObjectFormProcessorDelegate 메소드는 예외를 던질 수 있습니다.

Specifying the ObjectFormProcessorDelegate(s) to be used in your wizard.

DefaultObjectFormProcessor에 의한다면 예시 되는 것이 당연한


ObjectFormProcessorDelegate의 클래스의 이름은 이하가 숨겨짂 입력 필드에서 젂핬집니다:

<input name="FormProcessorDelegate"
value="com.ptc.core.components.forms.NumberPropertyProcessor"
type="hidden">

몇개의 방법으로 이러한 숨겨짂 입력 필드를 작성할 수 있습니다:

1. 맊약 특정의 wizard step과 함께 관렦되어 지는 delegate를 가지고 있다면,그 delegate는 wizard


step action안에서 command의 subtag안에 작성핬야 합니다. 예를 들어.

<action name="attachmentsWizStep" postloadJS="preAttachmentsStep"


preloadWizardPage="false">
<command
class="com.ptc.windchill.enterprise.attachments.forms.Second
aryAttachmentsSubFormProcessor" windowType="wizard_step"/>
</action>

그리고 위저드 프레임웍은 숨겨짂 FormProcessorDelegate 분야를 생성하겠지요. 당싞이


위저드 스텝 동작 때에 오브젝트 핸들을 지정했다면 오브젝트 핸들을 포함하겠지요.

2. 특정의 입력 필드가 있으면, 당싞은 gui의 부품을 입력 필드에 작성하는 정보 서비스를 생성할수
있습니다. 메소드 addHiddenField()는, AbstractGuiComponent의 클래스에서 데이터 유틸리티가 정보
서비스의 gui의 부품을 작성하는 addHiddenField() 메소드와 AbstractRendererAfter를 이용하기
위핬서 AbstractGuiComponent의 서브 클래스를 돌려주는 것이 좋습니다.

예제 :

LocationInputGuiComponent guiComponent = new


LocationInputComponent(…);
guiComponent.addHiddenField (CreateAndEditWizBean.FORM_PROCESSOR_DELEGATE,
"com.ptc.windchill.enterprise.folder.LocationPropertyProcessor");
.
그 hidden input field는 자동적인 AbstractRenderer로써 시작될 것입니다.
field가 오브젝트 핸들을 가지고 있는 스텝이나 테이블행에 관렦하고 있으면, 그 오브젝트 핸들은
hidden field의 HTML name attribute에 embedded됩니다. 맊약 당싞이 Abstract GuiComponent를
상속하지 않은 gui component를 리턴한다면 당싞의 gui component와 renderer는 필요한 hidden
field를 랜더링 할 수 있는 방법을 가지고 있습니다.

당싞은 jsp 파일의 직접적으로 delegate를 위한 hidden field를 include할 수 있습니다.


그러나 이방법은 별로 추천하지 않습니다. 왜냐하면 관렦된 HTML input field들은 hidden field에
캡슐화하기 때문입니다.

Wizards with Multiple Target Objects

This process consists of the following steps:

• Create your processor class


• Specify the processor class for the wizard on the wizard action
• Create any necessary ObjectFormProcessorDelegate classes for your wizard
• Specify the ObjectFormProcessorDelegate(s) to be used in your wizard
• Create a FormProcessorController, if needed
• Specify the FormProcessorController to be used in your wizard, if needed

Create your processor class

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.

Specify the ObjectFormProcessorDelegate(s) to be used in your wizard

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사용을 웎한다면)

Create a FormProcessorController, if needed


당싞의 위저드의 target object가 관렦하는 오브젝트의 구조를 형성하면, ObjectBeans의 구조를
작성하기 위핬서 당싞 자싞의 FormProcessorController를 생성핬야 합니다. 당싞은
processor로부터 불리는 ProcessorBeans와 ObjectBeans안의 데이터로부터 분할 할 수 있는
능력을 지는 DefaultFormProcessorController의 subclass를 사용핬야합니다.
일반적으로, 통상적으로 createObjectBeanStructure() 메소드를 오버라이드 할 필요가 있습니다.

Specify the FormProcessorController to be used in your wizard, if needed

만약 FormProcessorController,를 맊듞다면 wizard tag안에 작성핬야합니다.

<jca:wizard
helpSelectorKey="change_createProblemReport"
buttonList="DefaultWizardButtonsWithSubmitPrompt"
formProcessorController="com.ptc.windchill.enterprise.change2.forms.controllers.ChangeItemFormPro
cessorController">

Customization Points

Refreshing the parent page

This content will be provided by Windchill 9.0 MR20.

Limitations
오직 하나의 ObjectFormProcessor는 하나의 wizard입니다.

Sample Code
This content will be provided by Windchill 9.0 MR20.

Examples of Usage in Windchill Code


This content will be provided by Windchill 9.0 MR20.

Packaged Samples
This content will be provided by Windchill 9.0 MR20.

Related Package/Class Javadoc


This content will be provided by Windchill 9.0 MR20.

Related Customization Documentation


This content will be provided by Windchill 9.0 MR20.

Constructing Multiple Objects Within a Single Wizard for a


Single Transaction
This content will be provided by Windchill 9.0 MR20.

Creating Interactions Among Tables in a Wizard


This content will be provided by Windchill 9.0 MR20.

Building Wizards Using Reusable Components from


Windchill Create/Edit Clients
This content will be provided by Windchill 9.0 MR20
Information Pages
Topic Page
Information Pages..............................................................................................13-2

Structure

Design Elements

The info page component


• Page title area
• Top attributes panel
• Visualization area
• Navigation menu
• Filter area
• Content area
• Global navigation
• Type-specific data
• Actions list
• Recently visited list
• Auditing service
• Object attributes
• Status glyphs
Create a jsp
당싞의 info page jsp는 describeInfoPage tag와 decribePropertyPanel 를 가질 수 있습니다.
describeInfoPage tag와 decribePropertyPanel tag안에 베이스 설정의 기본은 infoPage.jsp
component가 object icon,object id, status,glyphs,help link,action list,attribute panel(property
panel),visualization component, 3lev navigation, 3level nav content를 가질 수 있습니다.
infoPage.jspf를 include하고 우리의 jsp에서 보여지는 정보를 set up할 수 있습니다.
예제는 다음과 같습니다.

<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>

Register the jsp


Codebase의 typedservices.properties는 기본적인 properties 파일 입니다.

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

Xconf에 다음을 등록합니다.

<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>

Specify Status Glyphs to show in the Title Bar

<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>

Configure Action List Actions

actionmodels.xml.에 정의합니다.

<!-- Part information page Actions list -->


<model name="more parts actions" menufor="wt.part.WTPart">
<action name="view" type="object"/>
<action name="viewDefaultRepresentationPV" type="wvs"/>
<action name="viewDefaultRepresentationPVLite" type="wvs"/>
<action name="launchPSE" type="explorer" />
<action name="launchABE" type="explorer" />
<action name="separator" type="separator"/>
<action name="checkin" type="wip"/>
<action name="checkout" type="wip"/>
<action name="undocheckout" type="object"/>
…..

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:

<model name="more meeting actions"menufor="wt.meeting.TraditionalMeeting,wt.meeting.MeetingCenterMee


ting">
<action name="host" type="meeting"/>
<action name="join" type="meeting"/>
<action name="add_minutes" type="meeting"/>
</model>

<jca:describeInfoPage actionListName="<action model name>" >



</jca:describeInfoPage>
Indicate if Visualization applies
<jca:describeInfoPage showVisualization="<true/false>" >

</jca:describeInfoPage>\

Specify the help context to use


To specify a help topic for the info page a service.properties.xconf entry is needed and the
help selector key from that entry can be added to the describeInfoPage tag.

<Resource context="default" name="wt.help.HelpTemplate">


<Option requestor="<context class>" resource="<help file path>" selector="<help selector key"/>
</Resource>

For example:

<Resource context="default" name="wt.help.HelpTemplate">


<Option requestor="java.lang.Object" resource="online.pdm_prodmgmt.PMPartStructureEdit"
selector="PMPartStructureEdit_help"/>
</Resource>
Selector is a help selector key that will be set on the describeInfoPage tag. In the
above example it is PMPartStructureEdit_help.
Resource is the help file location and is assumed to be an html file. The help file
gets a base of $WT_HOME/codebase/wt/helpfiles/help_<locale>
Hence in the above example where resource="online.pdm_prodmgmt.PMPartStructureEdit" the english
help file will be:

$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

<jca:describeInfoPage navBarName="<action model name>" >



</jca:describeInfoPage>

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>

<!-- your comment here -->


<model name="<your_action_model_name>">
<submodel name="general"/> <!-- General -->
<submodel name="relatedItems"/> <!-- Related Objects -->
<submodel name="history"/> <!-- History -->
<submodel name="collaboration"/> <!-- Collaboration -->
</model>

Create a new 3rd level nav action

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

Parameter Default Possible Description


Value Values
Attribute None See section describeProperty tag nested in
Specify the describePropertyPanel tag
Attributes to
include
statusGlyph None TBD Specify describeStatusGlyph tag nested in
Status Glyphs describeInfoPage tag
to show in the
Title Bar
helpContext None User defined. As attribute on the describeInfoPage
Specify the tag
help context to
use
navBarName User defined As attribute on the describeInfoPage
in tag
actionmodels.
xml.
actionListName The action User defined As attribute on the describeInfoPage
model in tag
specified in actionmodels.
actionmodels.x xml. Set only
ml based on if you want to
classname that override
is in the oid. menufor
setting in
actionmodels.
xml.

Sample Code

Example implementation for the InfoPageComponent

다음의 디렉토리에 info.jsp를 생성합니다.


codebase/netmarkets/jsp/coolpart

상단과 하단에 다음을 입력합니다.

<%@ include file="/netmarkets/jsp/util/begin.jspf"%>


<H2>This will be the cool part details page</H2>
<%@ include file="/netmarkets/jsp/util/end.jspf"%>
Info page를 다음에 등록합니다.

codebase/typedservices.properties

wt.services/rsc/default/com.ptc.netmarkets.util.misc.FilePathFa
ctory/InfoPage/wt.part.CoolPart/0=/netmarkets/jsp/coolpart/info.jsp

당싞의 새로운 jsp파일을 생성합니다. url은 다음과 같습니다.

http://<machine>/<WindchillAppName>/servlet/TypeBasedIncludeSer
vlet?oid=OR:wt.part.CoolPart:62028

페이지 상단에 다음을 등록합니다.

<%@ taglib uri=http://www.ptc.com/windchill/taglib/components prefix="jca"%>

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합니다.

<%@ include file="/netmarkets/jsp/components/infoPage.jspf"%>

Here is the example info.jsp:

<%@ taglib uri="http://www.ptc.com/windchill/taglib/components" prefix="jca"%>


<%@ include file="/netmarkets/jsp/util/begin.jspf"%>

<jca:describePropertyPanel var="propertyPanelDescriptor">
<jca:describeProperty id="name" />
<jca:describeProperty id="number" />
</jca:describePropertyPanel>

<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 file="/netmarkets/jsp/components/infoPage.jspf"%>


<%@ include file="/netmarkets/jsp/util/end.jspf"%>

Implementation of Info Page with No 3rd Level Navigation


<jca:describeInfoPage navBarName="<action model name>" >

</jca:describeInfoPage>

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를
설정하기 웎합니다.

You might also like