cancel
Showing results for 
Search instead for 
Did you mean: 

how to highlight the selected value in a table

Former Member
0 Kudos

Hi All,

I have list of roles in a table like admin,dba...etc.

i will select the current selected role using

Stgin role =wdCotext.currentElement().getRole();

After getting the role i bind this value in context.

now my requiremnet is i will navigate to other table view containing all roles like admin,dba,networkadmin .

I have to highlight the selected role in previous table to new table containing the all the roles.

means selected role should be highlight in a next table view list of roles.

please help.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi mohammad,

To achieve this functionality, use another integer variable to store the index of the currently selected element in the first view. Pass this variable's value to the next view (either as plug parameter or throgh mapping) and set the Lead selection for the table as this index in the second view.


In the first View ....
int n = wdContext.current<your_node>Element().index()

pass this value from first view to second view.

In the second view
wdContext.node<your_node>().setLeadSelection(n)

Hope this helps,

Best Regards,

Nibu.

Message was edited by: Nibu Wilson

Former Member
0 Kudos

Hi,

1.Get the selected value from the first table...

2.Loop through the node which is binded to the second table...

3.If(value from first table == wdContext.node<second>().get<Second>Elementat(i).get<that attr>())

4.Inside if write ..

wdContext.node<second>().setLeadSelection(i);

Regards

Bharathwaj

Former Member
0 Kudos

Hi,

You can do context mapping btn view1 and view2 though component/custom controller and you can pass the selected information from view1 to tableview2.

Depending upon the value you can select the value in the table.

Regards, Anilkumar