[displaytag - Help] RE: Casual order of columns

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[displaytag - Help] RE: Casual order of columns


Read and respond to this message at:
By: maxdaros

I solved the problem creating a list of column names, putting the list in the
session (or request) scope and then calling the jsp and using the column names
list in an <iterate> tag (Struts tag library). In this way, I can decide the
column order and also make the columns sortable.

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"   prefix="bean"
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"   prefix="html"
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"  prefix="logic"
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested" prefix="nested"
<%@ taglib uri="/WEB-INF/tld/c.tld"                           prefix="c"  
<%@ taglib uri="/WEB-INF/tld/displaytag-11.tld"               prefix="display"

        name        = "sessionScope.users"
        id          = "row"
        class       = "ISIS"
        export      = "true"
        sort        = "page"
        pagesize    = "10"
        style       = "width:65%"

        <!-- Table title -->
        <display:caption class="tableTitle">Users</display:caption>
        <!-- row numbers -->
        <display:column title="#">
          <c:out value="${row_rowNum}"/>
        <!-- Columns -->
        <nested:iterate name="columnList" id="columnName" type="java.lang.String">
          <display:column title="${columnName}" sortable="true"
headerClass="sortable"><bean:write name="row"

You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:

This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
displaytag-user mailing list
[hidden email]