You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Davide Bruzzone <Da...@ngt.com> on 2002/11/12 00:10:20 UTC
RE: Why would disabled="..." not take a runtime expression? The d
ocs say that it should...
>Does this fail whether "deny" is true or not? I would think
>that, since the default scope for "bean:define" is "page",
>if "deny" is not true, then "readOnly" will not be defined.
>If this is the problem, then I would put your "bean:define"
>outside of the "if"-like tag, and have the body of that tag
>set the previously defined bean.
Yes, that's what I'm doing...
>If I were designing a tag like that, I would have an optional
>"var" attribute that specifies the name of a scoped attribute
>to set, to "true" or "false" for the result.
Thank you for the suggestion...
Cheers...
Dave
> -----Original Message-----
> From: Davide Bruzzone [mailto:Davide.Bruzzone@ngt.com]
> Sent: Monday, November 11, 2002 2:36 PM
>
> 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:
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>