Announcement
Collapse
No announcement yet.
X
-
BTW, setCanEdit() works for me as well, so if it does not work for you, could you post a stand-alone test case?
-
I found the solution: Answer is
textitem.setAttribute("readOnly",true);
Leave a comment:
-
Try StaticTextItem instead.
BTW, if setCanEdit () is not defined or does not do the job, and you want to toggle the same TextItem between readOnly and not readOnly, I am guessing that you are stuck creating both StaticTextItem and a TextItem, keeping the values in sync between the 2, and then showing only one or the other...
Leave a comment:
-
TextItem readonly
Hi,
I want to set the value for TextItem by using setValue() method.
And also I want to make it readOnly to TextItem. I tried setCanEdit(false). It shows error.(The method setCanEdit(boolean) is undefined for the type TextItem)
My Code is
updatedBy = new TextItem(ITPC_USER_HELP.UPDATED_BY);
updatedBy.setValue(remoteUser);
updatedBy.setCanEdit(false);
Please let me know how to make it readonly.Tags: None
Leave a comment: