cancel
Showing results for 
Search instead for 
Did you mean: 

making specific input field inside webdynpro table as readonly at runtime

chinmaya_sahoo
Contributor
0 Kudos

Hi All

I have a webdynpro Table with input fields as the cells of table.

How can i make some specific input fields inside a webdynpro table as readonly depending on some specific criteria at runtime ?

Chinmaya

Accepted Solutions (0)

Answers (4)

Answers (4)

chinmaya_sahoo
Contributor
0 Kudos

Thank you all.

individual cells can made readonly by taking one boolean variable in the context node and this boolean variable is set to the table/cell(inputfield) cell readonly property.

Again thanks to all for your valuable answers.

Former Member
0 Kudos

Hi,

What do u mean of Full functionality?

For example your node structure is as below:

TestNode

--> Att1

--> Att2

--> readOnly (type: boolan)

If you have binded the Att2 attribtue to inputfield in the table column. Now bind readOnly boolean attribute to "ReadOnly" property of inputfield.

For example based on the Att1 value you need to make read only of inputfiled then write the code as below:

for(int iCount=0;iCount<wdContext.nodeTestNode().size();iCount++)
{
  if(wdContext.nodeTestNode().getTestNodeElementAt(iCount).getAtt1().equalsIgnorecase("X"))
  {
   wdContext.nodeTestNode().getTestNodeElementAt(iCount).setReadOnly(true);
  }
  else
  {
  wdContext.nodeTestNode().getTestNodeElementAt(iCount).setReadOnly(false);
  }
}

Regards,

Charan

Former Member
0 Kudos

Create a boolean attribute inside the data source node, bind the "readOnly" property of the cell editor to this attribute, set the attribute value to TRUE for those rows / node elements where your condition holds.

Armin

chinmaya_sahoo
Contributor
0 Kudos

Thanks Armin

I just tried with the option you have suggested, it works for a cell.

I need to check with the full functionality.

Thanks for reply.

Former Member
0 Kudos

Hi ,

Can you elobarate about your need?

Best Wishes

Idhaya R

Former Member
0 Kudos

Hi ChinMaya

you can create a cell variant with readonly attribute set to true, and when the specific criteria was true put the cell variant instead the editable input.

Regards

Marcos