bganoush
asked on
Adding a custom attribute to an existing tag
Hi,
I have a jsp file with an inputText tag that looks like this:
<h:inputText styleClass="inputText" id="objectname" required="true" value="#{msg.objectname}" maxlength="50" onblur="validateRequired(t his, event);">
I have a handler that looks at the class and if a specific word is found there, then it does some action. I would like to add to the action by looking for an attribute say "myAttr" and then do something else if that is set. For instance, I want to be able to do this:
<h:inputText styleClass="inputText" myAttr="showdetails" id="objectname" required="true" value="#{msg.objectname}" maxlength="50" onblur="validateRequired(t his, event);">
When I do this however, I get an exception:
Error Message:JSPG0227E: Exception caught while translating /jsp/view/MySpecialForm.js p: /jsp/view/MySpecialForm.js p(311,19) --> JSPG0123E: Unable to locate tag attribute info for tag attribute myAttr.
How can I add my attribute without causing an exception? Is this possible?
I have a jsp file with an inputText tag that looks like this:
<h:inputText styleClass="inputText" id="objectname" required="true" value="#{msg.objectname}" maxlength="50" onblur="validateRequired(t
I have a handler that looks at the class and if a specific word is found there, then it does some action. I would like to add to the action by looking for an attribute say "myAttr" and then do something else if that is set. For instance, I want to be able to do this:
<h:inputText styleClass="inputText" myAttr="showdetails" id="objectname" required="true" value="#{msg.objectname}" maxlength="50" onblur="validateRequired(t
When I do this however, I get an exception:
Error Message:JSPG0227E: Exception caught while translating /jsp/view/MySpecialForm.js
How can I add my attribute without causing an exception? Is this possible?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
ASKER
Thanks I'll try that.