You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Halbrook, Dolan" <dh...@cisco.com> on 2002/02/20 00:30:52 UTC

Have you seen this tag?

Hi all,

I've been looking for a tag that (IMHO) should exist, but doesn't seem 
to.  The tag would hide/show a marked section of a page with a + or - 
symbol (that can be specified, of course).  I imagined the syntax of my 
"drawer" tag as such:

<logic:iterate id="foo" indexId="i" name="form" property="foos">
     <ext:drawer id="<%= i %>" forward="doFoo"/page="thispage.jsp" >
         <table>
             <tr>
                 <td><ext:drawerOpen> + </ext:drawerOpen>
                     <ext:drawerClose> - </ext:drawerClose></td>
                 <td><bean:write name="foo" property="name"/></td>
             </tr>
             <ext:drawerArea>
                 <tr>
                     <td colspan="2"><bean:write name="foo" 
property="text"/></td>
                 </tr>
             </ext:drawerArea>

         </table>
     </ext:drawer>
</logic:iterate>

This would be for the case where you had multiple "drawers" to open and 
close.  I have it currently written in scriptlet form, using a 
java.util.BitSet to track the ids of open/closed sections (limits it to 
sequential integer ids, which is fine for iterated sections, but sucks for 
ad-hoc use), and passing   multiple instances of the same param (i.e. 
open=1&open=2&open=4), but this should really be a self-contained set of 
tags.  I know you can do this stuff in DHTML, but for this project that's 
out of the question.

Can I do this already with MonkeyStruts?  Is there already a tagset out 
there for doing this?  I'd love to know before I try my hand at tag 
authoring...

Thanks, Dolan
dhalbroo@cisco.com