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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Translate the entire conversation x

JS API to select the rows(user) of member table by default.

UR_10013634
6-Contributor

JS API to select the rows(user) of member table by default.

I am using Windchill PDMLink Release 13.0 and Datecode with CPS 13.0.2.5

We have the member selection OOTB table in a wizard, We need JavaScript API/snippet which will help us to select the given role by default on page load. Please refer the screenshot for more info.
6 REPLIES 6

Screenshot added

Hi @UR_10013634,

I wanted to see if you got the help you needed.

If so, please mark the appropriate reply as the Accepted Solution or please feel free to detail in a reply what has helped you and mark it as the Accepted Solution. It will help other members who may have the same question.

Of course, if you have more to share on your issue, please pursue the conversation.

Thanks,


Catalina
PTC Community Moderator
PTC
UR_10013634
6-Contributor
(To:Catalina)

Hello, @Catalina Thank you for your response. I tried the previously described solution, but it's not working the way I want it to. The OOTB member table is rendered concurrently with my custom JSP. When this page retenders, I would like one of the roles to be selected by default and its user as well.

HelesicPetr
22-Sapphire II
(To:UR_10013634)

Hi @UR_10013634 

Do you use the OOTB Memers table? if so you should create onw custom one and in the table configuration class set the setPreSelectableColumn variable

The help describes it more widely 

 

You have to understand that you need own hidden attribute that says the row is preselected

Section> Configuring Pre selectable rows based on a boolean attribute value available in the backing object

   <Service name="com.ptc.core.components.descriptor.DataUtility">
           <Option serviceClass="com.customPkg.TestCustomDataUtility " 
requestor="java.lang.Object" selector="col1” cardinality="duplicate"/> 
   </Service>
   TableConfig table = factory.newTableConfig ();
   --------
   ColumnConfig col = factory.newColumnConfig(<'''columnId'''>,  false);
   col.setNeed (<Attribute>); // Specify the attribute which will decide the 
row is pre selectable or not.
   col.setDataStoreOnly (true); // this will make your Column hidden
   table.addComponent (col);
   table.setPreSelectableColumn (col);

 PetrH

What are you actually trying to accomplish? If you just need to send an email to a specific role during a workflow, there are easier ways to do it.

Announcements
Top Tags