Skip to Content
0
Jul 05, 2016 at 02:35 PM

Make input field editable on click of button

3138 Views

Hello Experts

I followed example SAPUI5 Explored and am trying to make an input field editable on click of a button. In the declaration I have marked it as editable=false which works perfectly fine.

I am using below code to make it editable.

In xml

<Input id = "i4" value="{pid}" width="200px" editable="false"/>

<Input id = "i2" value="{pname}" width="200px" editable="false"/>

On click of button:

self.getView().byId("i4").seteditable(true);

self.getView().byId("i2").setEditable(true);

both commands does not seem to work. what is wrong above?