cancel
Showing results for 
Search instead for 
Did you mean: 

how to set lead select by reading values from another node

MG3
Contributor
0 Kudos

hi

i have a table with multiple rows and columns, i have to implement the search functionality and provide 2 links 'previous' and 'next' to move from one result to the other in the table.

in other words, when i do a search, if the string is found ( and here i store the index in the IndexNode), the corresponding row is highlighted(lead selected). if there are multiple results, it highlights the first result row. once i click on 'Next', it must go to the next row which matches the search string. likewise, when I click on 'Previous' link, it must go to the previous result row and highlight it.

i have implemented the search part and am able to highlight the result rows.

My Context looks like this:


DataNode
    |-Name
    |-Age
    |-Company

IndexNode
    |-Index
    

How do i implement the link part of it? I have to read the current lead selected row from the table, compare this with the index node, do a +1 or -1 (for 'next' or 'Previous' links respectively), get the value in that index attribute and use that value to set the lead select in the Data Table.

Please help. If you are not able to get my question, please let me know so I can rephrase the entire thing.

Thanks

Manoj

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
onNext():
wdContext.nodeIndexNode().moveNext();
wdContext.nodeDataNode().setLeadSelection
(
  wdContext.currentIndexNodeElement().getIndex()
);

onPrevious():
wdContext.nodeIndexNode().movePrevious();
wdContext.nodeDataNode().setLeadSelection
(
  wdContext.currentIndexNodeElement().getIndex()
);

Armin

MG3
Contributor
0 Kudos

Hi armin

That was quick and accurate...thank you very much. exactly what i needed...crisp accurate to the point.

thanks a ton

manoj

btw, Im not able to assign points...not getting the points radiobuttons..will try after i login again.

Answers (0)