I have a Struts web application with the following JSP page that
allows to display table.
        I would like to allow the user to sort column.

        <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
        <%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
        <%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>

        <html:form action="/MyAction.do" method="GET">

        <table id="table0" width="100%" border="1" cellpadding="0"
cellspacing="0" bordercolor="#FFFFFF">

        <%-- Title for the columns of the table --%>
        <tr bgcolor="#FFCC00">
            <th align=left width="10%"><bean:message key="title.id"/></th>
            <th align=left width="10%"><bean:message key="title.name"/></th>
        </tr>

        <logic:iterate name="myForm" id="employees" property="employees"
type="myBean.Employee" offset="offset" length="length">
        <tr bgcolor="#EBEBEB">
            <td bgcolor="#EBEBEB" width="10%"> 
              <html:link href="display.do">
                <bean:write name="employees" property="id"/>
              </html:link>
            </td>

            <td bgcolor="#EBEBEB" width="10%"> 
              <bean:write name="employees" property="name"/>
            </td>   
        </tr>
        </logic:iterate>

        </table>

        <script src="sortTable.js"></script>
        <script>initTable("table0");</script>
        </html:form>

        This page extends a common model classicLayout.jsp.
        Do I have to call the script in the <head> of the classicLayout.jsp
?

        I placed the JavaScript file sortTable.js in the same directory as
my JSP.
        But it doesn't work, has someone an idea of the problem ?

        

----------------------------------------------------------------------------

As of February 12th, 2003 Thomson unifies its email addresses on a worldwide
basis. 
Please note my new email address: [EMAIL PROTECTED] 

http://www.thomson.net/ 

Reply via email to