cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

How to limit a number of roleB item added to a Configurable Link table?

TranB
4-Participant

How to limit a number of roleB item added to a Configurable Link table?

Hi Windchill Guru's, 

Is it possible to limit only one roleB item added to a Configurable Link table.   What customization/configuration do I need to do?

Thank you, 

-Boi

ACCEPTED SOLUTION

Accepted Solutions

@TranB 

You need to program an action validator filter which extends the class DefaultSimpleValidationFilter

See CS299819 

 

Then you need to find the action located in %WT_HOME%/codebase/config/actions/...actions.xml. You can also find the action with the client customization enabled in the preference manager. Or add at the end of the url &jcaDebug=true. You need to figure out the name of the action.

Afterwards copy the defined action to the custom-actions.xml file and add your new filter to it. E.g.

 

  <objecttype name="object" 
  	resourceBundle="com.ptc.windchill.enterprise.object.configurableLinkObjectResource">

   <action name="configurableLink_add" ajax="component">
	    <includeFilter name="hideForNewObjectInWorkspace"/>
	    <includeFilter name="hideForCheckedoutObjectInWorkspace"/>
            <!--Add your custom filter here -->
            <includeFilter name="CUSThideForMultipleLinks"/>
   		<command class="com.ptc.windchill.enterprise.object.forms.ConfigLinkAddRelationFormProcessor"
	    	method="execute" windowType="popup"/>
   </action>
</objecttype>

 Don't forget to reload the actions or restart windchill.

View solution in original post

4 REPLIES 4

Probably the easiest way would be an action validator (filter). Enable the action if there is no object in the table, disable the action if there is already an object inside.

 

TranB
4-Participant
(To:BjoernRueegg)

Hi "bmr", 

 

Thanks for your reply.  I'm new to WC customization.  Could you please spread some more light on "action validator" filter?

What customization is needed to disable the "+" and the "Create New" action in table:  

ConfigurableLinkTable.png

Thanks, 

-Boi

@TranB 

You need to program an action validator filter which extends the class DefaultSimpleValidationFilter

See CS299819 

 

Then you need to find the action located in %WT_HOME%/codebase/config/actions/...actions.xml. You can also find the action with the client customization enabled in the preference manager. Or add at the end of the url &jcaDebug=true. You need to figure out the name of the action.

Afterwards copy the defined action to the custom-actions.xml file and add your new filter to it. E.g.

 

  <objecttype name="object" 
  	resourceBundle="com.ptc.windchill.enterprise.object.configurableLinkObjectResource">

   <action name="configurableLink_add" ajax="component">
	    <includeFilter name="hideForNewObjectInWorkspace"/>
	    <includeFilter name="hideForCheckedoutObjectInWorkspace"/>
            <!--Add your custom filter here -->
            <includeFilter name="CUSThideForMultipleLinks"/>
   		<command class="com.ptc.windchill.enterprise.object.forms.ConfigLinkAddRelationFormProcessor"
	    	method="execute" windowType="popup"/>
   </action>
</objecttype>

 Don't forget to reload the actions or restart windchill.

TranB
4-Participant
(To:BjoernRueegg)

Hi bmr, 

Thank you very much for your tips.   

Best Regards, 

-Boi

Announcements

Top Tags