Saturday 1 December 2012

Disabled components in Visual Force(VF) page

Sometimes we disable the components in VF page to make it read only, it works fine in firefox and other browsers too. But when it comes to the IE, it doesnt work properly as per our requirements.

ex: <apex:inputText id="text" disabled="true">

Here is the reason why it doesnt work properly. IE believes that if a component is disabled that means
user is not going to perform any action on it, so that 'tag' does not work too. so always use "readonly"
attribute to make a component only readable.

ex: <apex:inputText id="text" readOnly="true">

No comments:

Post a Comment