You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Session A Mwamufiya <sm...@andrew.cmu.edu> on 2007/08/08 08:26:18 UTC
How to check an action variable with s:if
Hi,
I've been trying for some time to get the following logic to work:
<s:if test="freshSmigFlag == false">
<s:checkbox key="overwriteCheckbox" name="overwriteCheck"></s:checkbox>
</s:if>
where "freshSmigFlag" is a variable in my action, and there is a getter and setter defined for it.
I also tried to surround the variable with the property tag as such:
<s:if test="<s:property id='freshSmigFlag'/> == false">
But that didn't work either.
Any ideas how we're suppose to write this?
Thanks,
Session
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: How to check an action variable with s:if
Posted by Nuwan Chandrasoma <my...@gmail.com>.
Hi,
I think you have to write it like this.
<s:if test="%{freshSmigFlag==false}">
<s:checkbox key="overwriteCheckbox" name="overwriteCheck"></s:checkbox>
</s:if>
Thanks,
Nuwan
Session A Mwamufiya wrote:
> Hi,
>
> I've been trying for some time to get the following logic to work:
>
> <s:if test="freshSmigFlag == false">
> <s:checkbox key="overwriteCheckbox" name="overwriteCheck"></s:checkbox>
> </s:if>
>
> where "freshSmigFlag" is a variable in my action, and there is a getter and setter defined for it.
>
> I also tried to surround the variable with the property tag as such:
> <s:if test="<s:property id='freshSmigFlag'/> == false">
>
> But that didn't work either.
>
> Any ideas how we're suppose to write this?
>
> Thanks,
> Session
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org