cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Readonly property of a TableCellEditor (InputField)

Former Member
0 Kudos

Hi,

I have created a table UI in which one column contains CellEditor(InputField), now at runtime I want to make this CellEditor to be ReadOnly based on the value of Binded node.

Let say if value is <100 then Cell should be available for Input otherwise it should be in readonly mode.

Also at the time of saving I want to check whether the value Entered by user is numeric or not ... I am able to check the value by looping on the node, but I want to SetFocus on the first wrong entered Cell.

Please revert back incase any doubt.

Regards,

Amit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Amit,

1. ReadOnly: create calculated read-only attribute IsReadOnly of type boolean in node that is table datasource or in 1..1 non-singleton child of thereof. In getter for calculated attribute write:

return element.getSomeTestAttr() < 100.

Bind attribute IsReadOnly to corresponding property of cell editor.

2. Hmmm... Can you just use numeric attributes for input? I mean content attributes with type integer or decimal?

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Hi Vellary,

Thanks wonderful solution.

The idea of mapping input filed with context attribute is fine, but in my case due to keep monotony I have to give error messge with Dialog Boxes, that's why I am gving message through tht Dialog and in Event Handler of that Dialog I want to make focus on that particular cell..

Alternatively I have to adopt the numeric context binding option..

Thank you..

Regards,

Amit

Answers (3)

Answers (3)

vijayakhanna_raman
Active Contributor
0 Kudos

Hi,

U can use calculated attribute for it check this post

Check this for Request focus

Request focus on ui elements:

Regards,

Vijayakhanna Raman

Former Member
0 Kudos

Hi

Create a boolean attribute with the Table node and set it to the UIElement's property readOnly and set it at runtime.

to set the focus see the thread

Kind Regards

Mukesh

Former Member
0 Kudos

Hi,

create an attribute of type boolean in the node you bind to the table. At the runtime you can check the condition based on condition set this attribute to true or false

You can parse the attribute and find whether it is numeric or not

Regards

Saravanan K