<!--- DISPLAY TAG ---> <display:table width="100%" name="list" display="1" decorator="some_class" > <display:column property="id" title="ID" decorator=" some_class " /> <display:column property="name" decorator=" some_class " /> <display:column property="type" decorator=" some_class " /> </display:table>
I've listed the decorator parameter on the tags because this will allow you to either wrap objects to provide special links or you can assign a decorator to each column where each column has it's own decorator: http://edhill.its.uiowa.edu/display-examples-0.8/example-decorator.jsp Example: http://edhill.its.uiowa.edu/display-examples-0.8/Wrapper.java.txt Hope this helps Jacob Hookom The Enverio Group http://www.enverio.com | -----Original Message----- | From: Heligon Sandra [mailto:[EMAIL PROTECTED]] | Sent: Wednesday, January 15, 2003 7:46 AM | To: 'Struts Users Mailing List' | Subject: RE: How to let a user click a column header to sort data in a | table using struts? | | I seek to use the tag < display:table > with an aim of offering the | sorting | by column header. I would wish to know if there is no disavantage to use | < display:table> rather than basic tag HTML. | In the display library examples JSP source combine table tag and | display:table tag. Why doesn't one use only display:table? | The list of the display:table and display:column | attributes are available in the display.tld file but is there an | explanation | in the form textual of these attributes ?the tld file is not detailed and | I | have some difficulties to modify my JSP page to use <display:*> tags. | | Can we combine < display:tag > with struts <logic:iterate> tag ? | | How can I modify the following code to use <display:*> tags ? | | <table width="100%" border="1" cellpadding="0" cellspacing="0" | bordercolor="#FFFFFF"> | | <%-- Title for the columns of the table --%> | <tr bgcolor="#FFCC00"> | <th align=left width="13%"><bean:message key="label.id"/></th> | <th align=left width="5%"><bean:message key="label.name"/></th> | <th align=left width="9%"><bean:message key="label.type"/></th> | </tr> | | <logic:iterate id="elements" name="list" type="myappli.myClass" | offset="offset" length="length"> | <tr bgcolor="#EBEBEB"> | <td bgcolor="#EBEBEB" width="13%"> | <html:link href="action.do"> | <bean:write name="elements" property="id"/> | </html:link> | </td> | | <td bgcolor="#EBEBEB" width="5%"> | <bean:write name="elements" property="name"/> | </td> | | <td bgcolor="#EBEBEB" width="10%"> | <html:checkbox name="elements" property="type" value="on"/> | </td> | </tr> | </logic:iterate> | </table> | | Least help would be appreciated. | Thanks | Sandra | -----Original Message----- | From: Dan Tran [mailto:[EMAIL PROTECTED]] | Sent: 15 January 2003 08:19 | To: Struts Users Mailing List | Subject: Re: How to let a user click a column header to sort data in a | table using struts? | | | http://edhill.its.uiowa.edu/display-0.8/ | | this does it for you in one click | | -D | ----- Original Message ----- | From: "Jason Yam" <[EMAIL PROTECTED]> | To: "Struts Users Mailing List" <[EMAIL PROTECTED]> | Sent: Tuesday, January 14, 2003 10:51 PM | Subject: How to let a user click a column header to sort data in a table | using struts? | | | > Hi all, | > | > anyone knows how to implement this sequence of operations in struts | > (i.e. click column header to sort)? | > | > DisplayAction -> jsp form -> ProcessAction -> jsp result with header | for | > sorting -> click one header -> jsp result with header for different | sorting | > order | > | > The result jsp has a table with multiple column headers. A user can | > click one of the column headers to sort the data in different order. I | do | > not know how to implement this in struts . Do I need to make a form in | the | > result jsp so that I can make another ProcessAction for sorting. For | > instance, | > | > DisplayAction -> jsp form -> ProcessAction *A* -> jsp result with | header | > for sorting -> click one header -> ProcessAction *B* -> jsp result with | > header for different sorting order | > | > How to change the struts-config to make it work? | > | > Thank you | > | > Jason | > | | -- | To unsubscribe, e-mail: | <mailto:[EMAIL PROTECTED]> | For additional commands, e-mail: | <mailto:[EMAIL PROTECTED]> | | -- | To unsubscribe, e-mail: <mailto:struts-user- | [EMAIL PROTECTED]> | For additional commands, e-mail: <mailto:struts-user- | [EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>