There was a thread a while back on TSS about lack of J2EE components. There are a lot of good visual JSP tags, my favourite being the <display:*> tag library, an open source table renderer that handles the displaying of columns, sorting, paging, cropping, grouping, exporting, smart linking and decoration of the table in a nice and customizable xhtml style.
Check it out at:
http://displaytag.sourceforge.net.
You can see live examples here:
http://www.displaytag.org/index.jsp.
It is awesome, simple, powerful!
Here you can also view my live example:
http://basebeans.com/do/channelsPg.
So if this is not a component, what is?
What is your favorite tag?
-
Discussion: My favorite J2EE component is ... DisplayTag (33 messages)
- Posted by: Vic Cekvenich
- Posted on: October 12 2003 19:30 EDT
Threaded Messages (33)
- DisplayTag is good by John Perkins on October 14 2003 13:10 EDT
- Discussion: My favorite J2EE component is ... DisplayTag by sean decor on October 14 2003 13:40 EDT
- How about RowSets ? by Paul Casal on October 14 2003 13:44 EDT
- Discussion: My favorite J2EE component is ... DisplayTag by Eugene Bloss on October 14 2003 13:45 EDT
- Discussion: My favorite J2EE component is ... DisplayTag by Paul Casal on October 14 2003 14:51 EDT
- Does it work yet with MVC/Struts? by Joe Celentano on October 14 2003 13:53 EDT
- re: Does it work yet with MVC/Struts? by andy pruitt on October 14 2003 14:11 EDT
-
re: Does it work yet with MVC/Struts? by Joe Celentano on October 14 2003 07:33 EDT
-
re: Does it work yet with MVC/Struts? by andy pruitt on October 14 2003 08:36 EDT
-
Comparison with struts HTML Tag ? by Don Elliott on October 15 2003 01:42 EDT
-
My Favourite - JSP Tree Tag by Jakob Jenkov on October 15 2003 04:41 EDT
- Looks good by vinay soni on October 15 2003 10:30 EDT
-
My Favourite - JSP Tree Tag by Jakob Jenkov on October 15 2003 04:41 EDT
-
Comparison with struts HTML Tag ? by Don Elliott on October 15 2003 01:42 EDT
-
re: Does it work yet with MVC/Struts? by andy pruitt on October 14 2003 08:36 EDT
-
re: Does it work yet with MVC/Struts? by Joe Celentano on October 14 2003 07:33 EDT
- Works great w/ Struts by Vic Cekvenich on October 14 2003 15:53 EDT
- Works great w/ Struts by Paul Casal on October 14 2003 04:11 EDT
-
Works great w/ Struts by Paul Casal on October 14 2003 04:13 EDT
- Wow i never knew this existed by Howard Hill on October 14 2003 06:09 EDT
- It works with Struts framework by avinash chinchwadkar on October 15 2003 08:28 EDT
- re: Does it work yet with MVC/Struts? by andy pruitt on October 14 2003 14:11 EDT
- My favorite J2EE component is ... Commons FileUpload by Jay K on October 14 2003 14:54 EDT
- Discussion: My favorite J2EE component is ... DisplayTag by Erik Bengtson on October 14 2003 15:54 EDT
- Discussion: My favorite J2EE component is ... DisplayTag by surajeet dev on October 16 2003 00:09 EDT
- Discussion: My favorite J2EE component is ... DisplayTag by user user0214 on October 14 2003 20:12 EDT
- displaytag + struts by null on October 15 2003 16:02 EDT
- Yes, you can by Guy Geens on October 20 2003 11:40 EDT
- Great tag! by Ricardo Saito on October 15 2003 18:24 EDT
- Cewolf worth a mention by andy pruitt on October 16 2003 11:20 EDT
- If too much data to save in session? by slump slump on October 16 2003 21:46 EDT
- This is possible with HTMLTable by Chris Nelson on October 17 2003 11:32 EDT
-
HELP ON HTMLTABLE component by JEAN-hubert FLAMEN on March 10 2004 04:59 EST
-
displaytag - Help needed by Daisy Psan on March 22 2004 02:22 EST
- checkboxes in displaytag by s br on July 09 2004 05:16 EDT
-
displaytag - Help needed by Daisy Psan on March 22 2004 02:22 EST
-
HELP ON HTMLTABLE component by JEAN-hubert FLAMEN on March 10 2004 04:59 EST
- This is possible with HTMLTable by Chris Nelson on October 17 2003 11:32 EDT
- Discussion: My favorite J2EE component is ... ValueList by Luke Groundwalker on August 10 2004 11:41 EDT
- uitags by Jonni Gani on January 21 2005 18:22 EST
- Displaytag and Maps by kai rivera on July 13 2005 12:25 EDT
-
DisplayTag is good[ Go to top ]
- Posted by: John Perkins
- Posted on: October 14 2003 13:10 EDT
- in response to Vic Cekvenich
I agree that the displayTag is really sharp and easy to implement. I had no problem handling my ArrayList of 400+ objects; however I will complain that it doesn't seem to possess the ability to sort against multiple columns, transform data prior to export, or allow for allow for list filtering (ie by alpha, date, etc.) like you might get via a struts logic:match tag. -
Discussion: My favorite J2EE component is ... DisplayTag[ Go to top ]
- Posted by: sean decor
- Posted on: October 14 2003 13:40 EDT
- in response to Vic Cekvenich
Its great for look n feel and simple stuff.
1. Can it support array or vector instead of the list.
2. nesting of tables looks ugly as in it has some java code inside the name tag to get hold of the sub list. any other better ways to nesting ??? -
How about RowSets ?[ Go to top ]
- Posted by: Paul Casal
- Posted on: October 14 2003 13:44 EDT
- in response to Vic Cekvenich
This tag looks really good, but I wonder if it works with a CachedRowSet. After all, having a long list of value objects that where just pulled out of the database doesn't make a lot of sense (Data Transfer RowSet pattern).
Cheers -
Discussion: My favorite J2EE component is ... DisplayTag[ Go to top ]
- Posted by: Eugene Bloss
- Posted on: October 14 2003 13:45 EDT
- in response to Vic Cekvenich
Our favorite is Coldtags suite:
www.servletsuite.com/jsp.htm
This suite actually saved some of our clients from ASP.NET :) -
Discussion: My favorite J2EE component is ... DisplayTag[ Go to top ]
- Posted by: Paul Casal
- Posted on: October 14 2003 14:51 EDT
- in response to Eugene Bloss
Our favorite is Coldtags suite:
> www.servletsuite.com/jsp.htm
>
> This suite actually saved some of our clients from ASP.NET :)
Thanks! Coldtags has a DataList tag that supports ResultSets. -
Does it work yet with MVC/Struts?[ Go to top ]
- Posted by: Joe Celentano
- Posted on: October 14 2003 13:53 EDT
- in response to Vic Cekvenich
Ed Hill presented at a BOF at JavaOne '02 and showed this tag he came up with. It was truly awesome. I came home and devoured it and found that my big problem was it was tough to integrate into a Struts environment. Forget about Tiles... It was great with your JSP that posts to itself directly, but if that wasn't what you were doing, it became extremely difficult to leverage for sorting, exporting, etc. since these functions post back to the display page with parameters.
At the time it wasn't on SourceForge and Ed wasn't replying much to his email. Has anybody that used the latest version tried to use it with Struts/Tiles? If I remember right it was also very difficult to use more than one table on a page since the display parameters had hardcoded names...
My comments may be outdated, so I'd love to hear if it's something I should go back and look at...
Joe -
re: Does it work yet with MVC/Struts?[ Go to top ]
- Posted by: andy pruitt
- Posted on: October 14 2003 14:11 EDT
- in response to Joe Celentano
Ed Hill presented at a BOF at JavaOne '02 and showed this tag he came up with. >It was truly awesome. I came home and devoured it and found that my big problem >was it was tough to integrate into a Struts environment. Forget about Tiles... >It was great with your JSP that posts to itself directly, but if that wasn't >what you were doing, it became extremely difficult to leverage for sorting, >exporting, etc. since these functions post back to the display page with >parameters.
>
> At the time it wasn't on SourceForge and Ed wasn't replying much to his email. >Has anybody that used the latest version tried to use it with Struts/Tiles? If >I remember right it was also very difficult to use more than one table on a >page since the display parameters had hardcoded names...
Yes, it does work with the Struts and Tiles. You need to use the requestURI attribute (http://displaytag.sourceforge.net/faq.html#action).
The biggest news of late is the introduction of the current (row) item as a scripting variable, so custom formats (like dates) can be implemented right in the displasy:column body.
I've found the export functionality to super slick; just say export="true" and your users can download the table directly as a spreadsheet. -
re: Does it work yet with MVC/Struts?[ Go to top ]
- Posted by: Joe Celentano
- Posted on: October 14 2003 19:33 EDT
- in response to andy pruitt
It's been a year and a half, so my memory is rusty here, and I think the requestURI solved some of the problem, but don't some of the functions default to invoking the current JSP? I think the export would by default invoke the current JSP page name to pass in a different parameter instead of being allowed to specify it. Maybe the paging mechanism and sorting suffered from this problem as well? Hopefully all this works fine now.
I didn't think there was compatibility problems with Struts/Tiles tags or anything like that, just that, well, it assumed too much about the environment it was living in. I'll definitely revisit it though. I always did think this was an awesome tag!
Joe -
re: Does it work yet with MVC/Struts?[ Go to top ]
- Posted by: andy pruitt
- Posted on: October 14 2003 20:36 EDT
- in response to Joe Celentano
Sorting and paging work fine.
The export thing is a little different; the trouble is that the tag needs to reset the content type and clear all previous pages, despite being in the middle of an included page, which as you can imagine, is a mess. That said, there are several fixes that have been/are being discused on the dev list. You can watch the issue at http://sourceforge.net/tracker/index.php?func=detail&aid=820763&group_id=73068&atid=536613
andy -
Comparison with struts HTML Tag ?[ Go to top ]
- Posted by: Don Elliott
- Posted on: October 15 2003 01:42 EDT
- in response to andy pruitt
This looks pretty good - how easy is it to incorporate form fields into the table as per the struts HTML tag library ?
http://htmltable.yuriy-zubarev.com/customerListEditable2.do
This library certainly seems to require a lot less setup in struts config, etc.
Also, how easy is it to change the CSS classes used for background colours, table lines, etc.. ? -
My Favourite - JSP Tree Tag[ Go to top ]
- Posted by: Jakob Jenkov
- Posted on: October 15 2003 04:41 EDT
- in response to Don Elliott
The Display Tag looks cool, I'll have to play around with it some day.
I haven't used that many different off-the-shelf J2EE components yet, so
until now, one of my favourite J2EE components (apart from the Struts stuff) is a JSP Tree Tag library I developed to make it easy to display trees in JSP pages (I have often needed that!). It's features are:
- The tree is generated as normal HTML
- it's 100% customizable in looks, and all customization is done in the JSP
(no magic/hidden classes etc.) It can look just like the windows explorer
tree if you want (check the demo).
- works well with Struts
- has good support for lazy building of the tree model on the server side
(model and view are of course separated).
- Is released under the LGPL, so it's free for commercial as well as
noncommercial use.
If you need trees in JSP pages that chnages often, or that are too big to be rendered as JavaScript tree, the JSP Tree Tag is a good alternative.
Check it out here:
http://www.jenkov.dk/projects/treetag/treetag.jsp -
Looks good[ Go to top ]
- Posted by: vinay soni
- Posted on: October 15 2003 22:30 EDT
- in response to Jakob Jenkov
Why don't the two tags table and tree join hands... -
Works great w/ Struts[ Go to top ]
- Posted by: Vic Cekvenich
- Posted on: October 14 2003 15:53 EDT
- in response to Joe Celentano
It works great w/ Struts, ex:
http://cvs.sourceforge.net/viewcvs.py/basicportal/bPproj/bP/WEB-INF/pgs/forums/ArticleLst.jsp
I would say it works best w/ Struts, and about 40% of my Struts pages have the display tag on it.
(Struts is just a controller/action, you can/should use it w/JSTL also).
For some frameworks, you may need a adapter from map to list, etc.
RowSet (which is not MVC in View layer) has a toCollection method AFAIK, so I assume you know how to get from Collection to a List? (Again, in Struts, this is easy. But why are people still coding to JDBC when we have wonderfull DAO's???)
.V -
Works great w/ Struts[ Go to top ]
- Posted by: Paul Casal
- Posted on: October 14 2003 16:11 EDT
- in response to Vic Cekvenich
RowSet (which is not MVC in View layer) has a toCollection method AFAIK, so I assume you know how to get from Collection to a List? (Again, in Struts, this is easy. But why are people still coding to JDBC when we have wonderfull DAO's???)
>
> .V -
Works great w/ Struts[ Go to top ]
- Posted by: Paul Casal
- Posted on: October 14 2003 16:13 EDT
- in response to Vic Cekvenich
RowSet (which is not MVC in View layer) has a toCollection method AFAIK, so I assume you know how to get from Collection to a List? (Again, in Struts, this is easy. But why are people still coding to JDBC when we have wonderfull DAO's???)
>
> .V
Check Floyd's EJB Design Patterns, Data Transfer RowSet. ;) He explains better than I do, but basically converting a RowSet to an array of DTO just for displaying is a waste. -
Wow i never knew this existed[ Go to top ]
- Posted by: Howard Hill
- Posted on: October 14 2003 18:09 EDT
- in response to Paul Casal
I am going to try it. Always needed something like this.
Well done guys. -
It works with Struts framework[ Go to top ]
- Posted by: avinash chinchwadkar
- Posted on: October 15 2003 08:28 EDT
- in response to Joe Celentano
I have used the display tag with struts framework. It works fine.
You can use decorator for additional functionality -
My favorite J2EE component is ... Commons FileUpload[ Go to top ]
- Posted by: Jay K
- Posted on: October 14 2003 14:54 EDT
- in response to Vic Cekvenich
My favorite component is FileUpload in Jakarta Commons. It's a very userful tag and saved lot of time.
Next time when I need to a report or a table presentation, I will definitly consider <display:*>.
-----------------------------------------
http://JavaRSS.com
Just one bookmark - for all java related news, articles and blogs.
----------------------------------------- -
Discussion: My favorite J2EE component is ... DisplayTag[ Go to top ]
- Posted by: Erik Bengtson
- Posted on: October 14 2003 15:54 EDT
- in response to Vic Cekvenich
1 more vote for DisplayTag. Perfect!!! -
Discussion: My favorite J2EE component is ... DisplayTag[ Go to top ]
- Posted by: surajeet dev
- Posted on: October 16 2003 00:09 EDT
- in response to Erik Bengtson
great work.. that fits exactly to almost all my requirements.just one question
Can we choose the list of columns to be displayed in the table. For eg:there are 20 columns and the user wants to view only 7 columns of his/her choice out of 20. Is it doable with this taglib? -
Discussion: My favorite J2EE component is ... DisplayTag[ Go to top ]
- Posted by: user user0214
- Posted on: October 14 2003 20:12 EDT
- in response to Vic Cekvenich
I just took a look at this DisplayTag and it's fantastic. Thanks -
displaytag + struts[ Go to top ]
- Posted by: null
- Posted on: October 15 2003 16:02 EDT
- in response to Vic Cekvenich
Very usefull tag. But when you use struts you can't do something like this:
display:column property="fullName" sort="true" width="15%"
title='<%=resources.getMessage("userForm.fullName")%>' />
and i dont want to hardcode the column's title on the jsp file
Ignacio -
Yes, you can[ Go to top ]
- Posted by: Guy Geens
- Posted on: October 20 2003 11:40 EDT
- in response to null
Use something like:
<bean:define id="myTitle">
<bean:message key="userForm.fullName"/>
</bean:define>
And then:
<display:column ... title='<%=myTitle%>'> -
Great tag![ Go to top ]
- Posted by: Ricardo Saito
- Posted on: October 15 2003 18:24 EDT
- in response to Vic Cekvenich
That's exactly what I was looking for!
Great tag! -
Cewolf worth a mention[ Go to top ]
- Posted by: andy pruitt
- Posted on: October 16 2003 11:20 EDT
- in response to Vic Cekvenich
Although DisplayTag is my favorite, somebody has to give honorable mention to cewolf. You get decent looking graphs and charts on your site for minimal effort, with hardly any configuration hassle or learning curve. It's a nice package.
http://cewolf.sourceforge.net for more details. -
If too much data to save in session?[ Go to top ]
- Posted by: slump slump
- Posted on: October 16 2003 21:46 EDT
- in response to Vic Cekvenich
it seems good
but it require to save all data in session
if I have 1 million rows
It is too large to save all data in session
how to do paging the result? -
This is possible with HTMLTable[ Go to top ]
- Posted by: Chris Nelson
- Posted on: October 17 2003 11:32 EDT
- in response to slump slump
I've been looking at the HTMLTable taglib: http://htmltable.yuriy-zubarev.com/jsp/index.jsp which can passes along parameters so you can do the sorting and paging in your action using OJB or Hibernate. I like the look of Display a little better though, so I might use it if it can do it also. Does anybody know if it can do this? -
HELP ON HTMLTABLE component[ Go to top ]
- Posted by: JEAN-hubert FLAMEN
- Posted on: March 10 2004 04:59 EST
- in response to Chris Nelson
I'am agree, HTMLTABLE is fine but i have a trouble to understand very well the process to load data. I would like to use it with Oracle Database table.
I have seen help on author site, it's not very large and i asked questions at the authors but no response arrive !!!
Please if you have somes mores informations about htmltable, don't hesitate
thanks ! -
displaytag - Help needed[ Go to top ]
- Posted by: Daisy Psan
- Posted on: March 22 2004 02:22 EST
- in response to JEAN-hubert FLAMEN
I found display tag to be very useful in manipulating tables.
I would like to know if displaytag can be used to sort the entire list when
paging is used.
Also, I found that HTMLtag tables can display checkboxes for each row easily.
Is there any method of doing so using the displaytag?
Thanks,
Deepa -
checkboxes in displaytag[ Go to top ]
- Posted by: s br
- Posted on: July 09 2004 05:16 EDT
- in response to Daisy Psan
Try this:
<html-el:form action="/out_PrintShippingLists?action=print">
<display:table name="sessionScope.ShippingList" id="currentObject" defaultsort="1">
<display:column title="Print" nowrap="true" >
<html-el:multibox property="itemsToPrint" value="${currentObject_rowNum}" />
</display:column>
<display:column property="destination" sortable="true" headerClass="sortable" />
<display:column property="dynamicLocationId" sortable="true" headerClass="sortable" />
</display:table>
<c:if test="${showPrintButton}">
<html-el:submit value="Print" />
</c:if>
</html-el:form> -
Discussion: My favorite J2EE component is ... ValueList[ Go to top ]
- Posted by: Luke Groundwalker
- Posted on: August 10 2004 11:41 EDT
- in response to Vic Cekvenich
I used the DisplayTag till I ran into ValueList. The ValueList is a little more complex than DisplayTag, but it is way more powerfull.
Check it out at:
http://valuelist.sourceforge.net -
uitags[ Go to top ]
- Posted by: Jonni Gani
- Posted on: January 21 2005 18:22 EST
- in response to Vic Cekvenich
Disclaimer: I am one of uitags developers.
We got tired of having to create user-unfriendly forms (due to tight project deadlines) so we wrote a set of reusable tags that addresses some of the most common annoyances in web UI including:
1. Webapps that log users out on session timeout without warning, causing them to lose the text they've just finished typing.
2. Select boxes (combo boxes) that contain way too many values to select from. These things are difficult to use. Imagine you are using a small select box to select 5 values out of 300. You've got to scroll to find an entry (not easy!), press Control, click the entry to highlight it, and repeat this 4 more times. If you forgot to press Control, you'll have to repeat all over again!
3. Complicated forms that don't provide visual guide by disabling (graying out) irrelevant input fields.
Here's the project homepage:
http://uitags.sourceforge.net/ -
Displaytag and Maps[ Go to top ]
- Posted by: kai rivera
- Posted on: July 13 2005 12:25 EDT
- in response to Vic Cekvenich
Does anybody know how to display a Map of objects of type LabelValueBean?
Say, I have an ArrayList documentList which I would like to display on a page. Each document has a path, a title and Map called properties.
The properties map may have several items in it depending on the document. But what I only need to display on the page are dateModified, dateCreated and owner.
I've started with:
<display:table id="document" name="documentList">
<display:column property="title" />
<display:column property="path" />
<!-- I need to display the map here --->
</display:table>
Thanks in advance.