Greetings all...

I'm trying to control whether or not some form fields are editable using a
custom security tag. So, at the top of the page, I have something like this:

<%-- Page security --%>
<bean:define id="readOnly" type="java.lang.String" value="false"/>
                        
<ngt-security:hasNoPermission deny="deny">
        <bean:define id="readOnly" type="java.lang.String" value="true"/>
</ngt-security:hasNoPermission>

If the deny attribute is anything but null or an empty string, readOnly is
set to "true". Then I try to do this:

<html:select property="priority" styleClass="fullwidth" disabled="<%=
readOnly %>">
        ...
</html:select>

What I get back is that the readOnly symbol cannot be resolved... However,
the following tests work:

- <html:select property="priority" styleClass="fullwidth" disabled="true">
- <%= readOnly %> (On its own... This prints out "true")

This is just strange. According to the documentation, disabled should be
able to take a runtime expression, and I use runtime expressions of the form
<%= someVariable %> all over the palce elsewhere.

Any insight would be greatly appreciated.

Cheers...

Davide Bruzzone


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to