You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mick Knutson <mi...@hotmail.com> on 2003/10/10 16:30:00 UTC
Help with Tiles matching a checkbox
I am trying to have a Tile replace an html checkbox with an image. But I can't seem to get this to work.
<tiles:useAttribute id="beanName" name="property" classname="java.lang.String" ignore="true" />
<tiles:importAttribute name="bean" />
<bean:define id="checkbox" name="bean" property='<%= beanName %>' type="java.lang.String" value="" />
<logic:present name="bean" >
<logic:match name="bean" property='<%= checkbox %>' value="on" >
<%= checkbox %>:::logicmatch<html:img bundle="IMAGE_RESOURCES_KEY" height="15" width="15" srcKey="default.checked" />
</logic:match>
<logic:notMatch name="bean" property='<%= checkbox %>' value="on" >
<%= checkbox %>logic:notMatch<html:img bundle="IMAGE_RESOURCES_KEY" height="15" width="15" srcKey="default.unchecked" />
</logic:notMatch>
</logic:present>
<logic:present name="bean" >
<logic:match name="bean" property='<%= checkbox %>' value="on" >
<%= checkbox %>:::logicmatch<html:img bundle="IMAGE_RESOURCES_KEY" height="15" width="15" srcKey="default.checked" />
</logic:match>
<logic:notMatch name="bean" property='<%= checkbox %>' value="on" >
<%= checkbox %>logic:notMatch<html:img bundle="IMAGE_RESOURCES_KEY" height="15" width="15" srcKey="default.unchecked" />
</logic:notMatch>
</logic:present>
<logic:notPresent name="bean" >
logic:notPresent<html:img bundle="IMAGE_RESOURCES_KEY" height="15" width="15" srcKey="default.unchecked" />
</logic:notPresent>
---
Thanks
Mick Knutson
The world is a playground...Play Hard, Play Smart.
Visit http://www.YourSoS.com to learn how our "Personal Emergency Alert & Contact System" can help you Play Smart.
+00 1 (708) 570-2772 Fax
MSN: mickknutson
ICQ: 316498480
ICQ URL: http://wwp.icq.com/316498480
---