cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Table Lead Selected Row elements

Former Member
0 Kudos

Hi all

I am in working in WD java, table UI element. I have binded table with a context node with some attributes. I have intialized the node with some rows and displayed it as inputfields in table cell editor in the table. As default i have set all the cell columns as disabled.

My requirement is to enable all input field elements in the selected row when the particular row is selected. I used context attribute in 'enabled' field of the cell column and changed it on onleadselection action of the table. But the whole column changes. I need fields in the particular selected row to be enabled.

Any help ll be appreciated.

Thanks in Advance,

Rakesh ;>)

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can use a calculated attribute for this.

Let "Rows" be the table's data source node. Add calculated attribute "RowEnabled" under "Rows", (type=boolean,readOnly=true).

If you cannot add attributes under that node, use a helper value node etc.

Bind the "enabled" property of the table cell editor of all columns to that attribute. (Perhaps you better use the "readOnly" property, this works the same way).

Implement the get-method of the calculated attribute:

boolean getRowEnabled(IRowsElement element)
{
  return element.node().getLeadSelection() == element.index();
}

Assign an empty action to the Table.onLeadSelect event such that you get a server roundtrip on each lead selection change.

Armin

Former Member
0 Kudos

Hi Armin

Thanks a lot for solving the problem.

Regards ;>)

Answers (0)