`

搜索显示能否显示客制化属性

阅读更多

搜索显示能否显示客制化属性

搜索后显示是可以选择的,是否可以通过设置显示自定义的属性?
problem

 
在Windchill9中可以通过在页面上自定义表格视图完成,但是在Windchill8中需要修改配置文件。
Here is the information to add a column to configuration files DCA:

1. For the normal search page, you will have to modify <windchill_home>/conf/dca/com/ptc/core/foundation/fc/Persistable.xml:

1.1 add you new column to the definition of “elementGroup.compositeColumns.object.columns”:

<!-- SIMPLE SEARCH - results definition -->
<Context type="%[:PERSISTABLE]" tablePrefId="compositeTable.default" tableUsageId="compositeTable.searchResults">
<ElementGroup id="elementGroup.compositeColumns.object.columns">
<Insert ref="elementGroup.compositeColumn.thumbnail" />

<Insert ref=":elementGroup.compositeColumn.organization" />
<Insert ref="patterns:compositeColumn.template" context.property="property.yourProperty">
<Label resource="Your label" />
</Insert>
</ElementGroup>

1.2 and to the “elementGroup.compositeColumns.object.columns.order” definition (used to define the order in which the columns will be displayed):

<ElementGroup id="elementGroup.compositeColumns.object.columns.order" >
<Option theme="order" param="labelArea.tablePattern.icon" /> <!--0-->
<Option theme="order" param="hyperlink.object.name.info" /> <!--1-->

<Option theme="order" param="property.thePersistInfo.createStamp" /> <!--11-->
<Option theme="order" param="property.yourProperty" /> <!--12-->
</ElementGroup>

1.3. finally, create a new paragraph to define your “property.yourProperty” id (for instance, if this is a string attribute):

<Context type="wt.fc.Persistable">
<Property id="property.yourProperty" sticky="%[context#sticky]">
<Extend ref=":property.string" />
<Need attribute="yourAttribute" />
<Label resource="Your Label" />
</Property>
</Context>

2. For the Advanced Search page, you will need to perform the modification for each kind of object. I will give you an example for a subtype of WTPart, which has a soft attribute "md_attr0190". you will then have to modify <windchill_home>\conf\dca\com\ptc\windchill\enterprise\part\WTPart.xml:

2.1. Add your column to the definition of “elementGroup.compositeColumns.object.columns”: 

<Context type="%[WTPart]" tablePrefId="compositeTable.default" tableUsageId="compositeTable.searchResults">      
        <ElementGroup id="elementGroup.compositeColumns.object.columns">
            <Insert ref=":elementGroup.compositeColumns.object.columns.cumulative|%[WTPart]" />
            <Insert ref=":elementGroup.oemPreference.PropertyRef" context.UIComponent="table"
                       if="%[ifInstalled#all#:setSupplierManagement]==true"/>
            <Insert ref=":elementGroup.compositeColumn.seeActions" />
            <!--Added -->
            <CompositeColumn show=":property.yourProperty">
            <Label resource="Your label"/>
            </CompositeColumn>
           
        </ElementGroup>        
</Context>

2.2. If the element “property.yourProperty” dosen’t already exist in the configuration files, you will need to define it: 

<Context type="%[WTPart]">
 <Property id="property.yourProperty">
     <Extend ref="core:property.string" />
     <Need attribute="yourAttribute" />
     <label resource="Your Label" />
 </Property> 
</Context>

3. The value in the Need Attribute tag is the logical Identify defined in the attribute manager for the IBAs (I change "yourAttribute" to "md_attr0190").

The columns are added reflected in the preferences of the table.

For the IBAs defined WTPart or sub types can be displayed in the natural search (which runs on Persistable), we must add entries in the file <Windchill\home> \codebase\com\ ptc\windchill\enterprise\search\server\SearchableAttributes.properties, such as:
yourAttribute=WCTYPE|wt.fc.Persistable~IBA|yourAttribute 

Finally, you must restart Tomcat and the method servers.
f
f
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics