Dear S.Logasumathi,
Displaytag is an opensource tag library that can be used to display tables
on JSPs. Apart from being able to display tables, the displaytag library
also has support for JSR-168 compliant portals through the "Display portal
compatibility library", and also supports exporting tables to Excel through
the "Excel export module". The following example demonstrates the use of
DisplayTag to display a long list as a multi-page table.
To run the example, follow these steps:
1. Download Displaytags from here
<http://displaytag.sourceforge.net/11/download.html> , and include the
displaytag-1.1.jar file in your classpath or in your lib of your Application
Let's suppose you have a list which you get from a action class (in case you
are using MVC2). Put the object in session but first include the following
or edit the JSP:root declaration
<jsp:root
version="2.0"
xmlns:jsp=http://java.sun.com/JSP/Page
xmlns:c="urn:jsptld:c.tld"
xmlns:html="urn:jsptld:struts-html.tld"
xmlns:fmt="urn:jsptld:fmt.tld"
xmlns:logic="urn:jsptld:struts-logic.tld"
xmlns:bean="urn:jsptld:struts-bean.tld"
xmlns:ilrn="urn:jsptld:ilrn-common.tld"
xmlns:tiles="urn:jsptld:struts-tiles.tld"
xmlns:display="urn:jsptld:http://displaytag.sf.net">
<jsp:scriptlet>
if(session.getAttribute("AssList") == null)
{
out.println("List does not exist in
session");
session.setAttribute( "AssList",
request.getAttribute("studentAssignmentSummaries"));
}
</jsp:scriptlet>
// Here is the implementation to retrieve the List using Display Tag
<display:table class="standard-color" cellspacing="0" cellpadding="0"
name="sessionScope.EmployeeList" id="assignmentSummary" pagesize="5"
requestURI="http://...../assignmentOverview.do">
<display:column title="Date Due" property="empId"
class="${grayRowStyle}"/> // Please note property attribute takes the name
of the property or member variable of your bean
</display:table>
..
Hope this helps!!
Yogesh
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
S.Logasumathi
Sent: Thursday, May 10, 2007 8:53 AM
To: [email protected]
Subject: Re: [displaytag-user] displaytag-user Digest, Vol 13, Issue 7
hi yogesh,
can you please tell me about this display tag and its libraries. how to
use this tag.
Thanks and Regards
S.Logasumathi
System Analyst
Mani India Techonologies.
----- Original Message -----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
To: [email protected]
Sent: Wed, 09 May 2007 12:04:37 -0700
Subject: displaytag-user Digest, Vol 13, Issue 7
Send displaytag-user mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
https://lists.sourceforge.net/lists/listinfo/displaytag-user
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of displaytag-user digest..."
Today's Topics:
1. Re: How to use <tiles:insert> tag inside display:column
(Yogesh Kumar Verma)
----------------------------------------------------------------------
Message: 1
Date: Wed, 9 May 2007 13:45:14 +0530
From: "Yogesh Kumar Verma" <[EMAIL PROTECTED]>
Subject: Re: [displaytag-user] How to use <tiles:insert> tag inside
display:column
To: <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"
Hello All,
I am using display: tag library to incorporate Pagination feature in my
project. Everything seems to be working fine; but there is a situation in
which I need to bring in some data from another JSP inside my column.
Following is a code snippet which I am trying to use, but it seems that this
is not working.
<display:column title="Actions" >
<c:set var="theAssignmentSummary"
value="${assignmentSummary}" scope="request"/>
<tiles:insert attribute="assignmentAction" />
</display:column>
Any thoughts or advise???
Regards,
Yogesh
-------------- next part --------------
An HTML attachment was scrubbed...
------------------------------
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
------------------------------
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user
End of displaytag-user Digest, Vol 13, Issue 7
**********************************************
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user