cancel
Showing results for 
Search instead for 
Did you mean: 

Accesing UI control properties

Former Member
0 Kudos

Hi,

I am trying to acces InputField properties.

IWDInputField ts = (IWDInputField)view.getElement("InputField1");

ts.setReadOnly(false);

What does the view (view.getElement("InputField1");) stands for? I can not use it like this because it always says: "view cannot be resolved".

Please help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Ivo,

"InputField1" stands for your UI Element ID. If you change it to name_input you will write like this:

IWDInputField inf = (IWDInputField) view.getElement("name_input");

Moreover if u just want to set readOnly property, you can set it through either calculated context variable or normal context variable. In this case attach context variable top readOnly property of your input field and set that programatically. You dont need to use dynamic programming.

/Raj.

Message was edited by: Raj

Former Member
0 Kudos

I know that "InputField1" stands for UI element ID. But I need to know what does the wor "view" stands for because it is underlined and reports error: "view cannot be resolved".

Former Member
0 Kudos

Ivo,

where are u writing this code, you should write it in wdDoModifyView().

/Raj.

Former Member
0 Kudos

Thank you, thats it.

Answers (0)