You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by fea jabi <zy...@hotmail.com> on 2005/11/07 19:24:23 UTC

struts - displaytag table

In the JSP I have the below. which is working fine using struts tags.

Now would like to use displaytags as it has auto sorting of columns. How can 
I convert the below to use displaytag?  as the form that's used in the jsp 
is different from the one that's used to display the data in the table.


<table class="single-line-table">
            <tr class="columnHeader">
                <td class="columnHeader"><bean:message key="lbl.name"/></td>
                <td class="columnHeader"><bean:message key="lbl.type"/></td>
                <td class="columnHeader"><bean:message 
key="lbl.status"/></td>
                <td class="columnHeader"><bean:message key="lbl.date"/></td>
            </tr>
                <logic:iterate name="Form1" property="prm" id="runs" 
type="com.formbeans.Form2">
                    <tr>
                        <td>
                            <a href="action1.do">
                            <bean:write name="runs" property="name"/>
                        </td>
                        <td >
                            <bean:write name="runs" property="type" />
                        </td>
                        <td>
                            <bean:write name="runs" property="status" />
                        </td>
                        <td>
                            <bean:write name="runs" property="date" />
                        </td>
                    </tr>
                </logic:iterate>
          </table>

I would appreciate your help. this forum has been a great help for me.

thanks.

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfeeŽ 
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


displaytag headerClass

Posted by fea jabi <zy...@hotmail.com>.
thank you all for helping me. I've got this working. This tag is great.

I've one question though.
I used a headerClass. in which I gave the color attribute to be white. I 
thought the text of header will be white. But it is not. It was displaying 
in white before I used the displaytag.

Is there a way I can set the header text color to be white.

.columnHeader {
  background-color: #3CB371;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  font-weight: bold;
  color: #FFFFFF;
  text-align: center;
  padding-bottom: 2px;
  padding-top: 2px;
}

                <display:column property="type" sortable="true" 
headerClass="columnHeader"/>

it is blue by default.

Thanks.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: struts - displaytag table

Posted by "David G. Friedman" <hu...@ix.netcom.com>.
Fea,

You should really look at the DisplayTag site's examples.  They show how to
do the looping on your collection and how to add the hrefs for linking to
your application.  After reading those, you'll be able to redo your JSP
without assistance.
See http://www.displaytag.org

Regards,
David

-----Original Message-----
From: fea jabi [mailto:zyxrm@hotmail.com]
Sent: Monday, November 07, 2005 1:24 PM
To: user@struts.apache.org
Subject: struts - displaytag table


In the JSP I have the below. which is working fine using struts tags.

Now would like to use displaytags as it has auto sorting of columns. How can
I convert the below to use displaytag?  as the form that's used in the jsp
is different from the one that's used to display the data in the table.


<table class="single-line-table">
            <tr class="columnHeader">
                <td class="columnHeader"><bean:message key="lbl.name"/></td>
                <td class="columnHeader"><bean:message key="lbl.type"/></td>
                <td class="columnHeader"><bean:message
key="lbl.status"/></td>
                <td class="columnHeader"><bean:message key="lbl.date"/></td>
            </tr>
                <logic:iterate name="Form1" property="prm" id="runs"
type="com.formbeans.Form2">
                    <tr>
                        <td>
                            <a href="action1.do">
                            <bean:write name="runs" property="name"/>
                        </td>
                        <td >
                            <bean:write name="runs" property="type" />
                        </td>
                        <td>
                            <bean:write name="runs" property="status" />
                        </td>
                        <td>
                            <bean:write name="runs" property="date" />
                        </td>
                    </tr>
                </logic:iterate>
          </table>

I would appreciate your help. this forum has been a great help for me.

thanks.

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee®
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org