Skip to Content
author's profile photo Former Member
Former Member

Accessing Table Lead Selected Row elements

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 ;>)

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 04, 2006 at 08:23 AM

    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

    Add comment
    10|10000 characters needed characters exceeded