I have a boolean value in my action form:
private boolean disableForm;
How can I disable a text input based on the value of disableForm? The follow below does not work
<html:text name="WorkForm" styleId="maildate" property="mailDate" maxlength="10" size="10" disabled="<%=disableForm.booleanValue()%>" />
Joined: Aug 21, 2009
First keep the boolean value in request in Action class.
The disabled attribute doesn't understands true/false values. Its value is disabled i.e. disabled="disabled". So you'll need to use a condition and generate the disabled attribute only if you want to disable the text box...