JSTL and Struts - disabling a text field
843836Mar 23 2004 — edited Mar 24 2004I am trying to disable a <html:text.../> field using JSTL and a property from the form. It will not work. Does anyone know the trick to making it work?
My Struts form bean has this (I've tried returning a boolean too, it still doesn't work.):
public String getDsblFld()
{
String out = Boolean.toString( !( isAdmin()) );
return out;
}
And the JSP has this:
<html:text property="accountName" size="15"
disabled="${editUserForm.dsblFld}"/>
However, if I do it using JSP code, it works, but I don't want to do it that way!
<%
boolean dsblFld = !((EditUserForm) request.getAttribute("editUserForm")).isAdmin();
%>
...
<html:text property="accountName" size="15"
disabled="<%=dsblFld%>"/>
How can I make it work using JSTL expressions? THANKS!