The future of the DisplayTag Library
From the displaytag-devel mailing list:
I am sorry if I am asking a stupid question but is there any activity going on in the project? There are no new releases for almost a year... Neither are there any news on the project page. In our project we have modified the 1.0 version a bit and would like to share these changes with the community.
Fabrizio's response:
See http://displaytag.sourceforge.net now
the website was frozen to the last 1.0 release, also due an extensive
refactoring to the build/documentation system (migration to maven 2,
splitting of optional modules and examples, ...) but activity on the
project never stopped.
1.1 is now near, and I switched the default homepage to the 1.1
documentation. Warning: it's not released yet, but nightly builds are
up.
The biggest feature of 1.1 has to be the ability to do external sorting and paging.
If you're looking for Ajax support in the displaytag, look no further than AjaxTags. I haven't been able to get ajax:displayTag working in my projects because I'm using a newer version of Prototype. However, it looks like the next version of AjaxTags supports the latest version of Prototype.
In addition to AjaxTags, you can also use AjaxAnywhere. Here's the code you'll need to do that (after adding AjaxAnywhere to your project):
<aa:zone name="userTable"> <display:table name="users" class="list" requestURI="" id="userList" export="true" excludedParams="*" pagesize="5" sort="list"> <display:column property="id" sort="true" href="editUser.html" paramId="id" paramProperty="id" titleKey="user.id"/> <display:column property="firstName" sort="true" titleKey="user.firstName"/> <display:column property="lastName" sort="true" titleKey="user.lastName"/> <display:column titleKey="user.birthday" sort="true" sortProperty="birthday"> <fmt:formatDate value="${userList.birthday}" pattern="${datePattern}"/> </display:column> </display:table> </aa:zone> <script type="text/javascript"> ajaxAnywhere.getZonesToReaload = function() { return "userTable" } ajaxAnywhere.onAfterResponseProcessing = function() { replaceLinks() } function replaceLinks() { // replace all the links in <thead> with onclick's that call AjaxAnywhere var sortLinks = $('userList').getElementsByTagName('thead')[0] .getElementsByTagName('a'); ajaxifyLinks(sortLinks); if (document.getElementsByClassName('pagelinks').length > 0) { var pagelinks = document.getElementsByClassName('pagelinks')[0] .getElementsByTagName('a'); ajaxifyLinks(pagelinks); } } function ajaxifyLinks(links) { for (i=0; i < links.length; i++) { links[i].onclick = function() { ajaxAnywhere.getAJAX(this.href); return false; } } } replaceLinks(); </script>
Libraries used in above code: AjaxAnywhere 1.0.2, DisplayTag 1.0 and Prototype 1.4.0_pre4. You can also see a demo online or download the code.
Posted by Michael Jouravlev on January 04, 2006 at 05:33 PM MST #
Posted by Matt Raible on January 04, 2006 at 06:03 PM MST #
Posted by Matt Raible on January 04, 2006 at 06:06 PM MST #
Posted by Michael Jouravlev on January 05, 2006 at 12:57 AM MST #
Posted by Burak Nona on January 08, 2006 at 11:08 PM MST #
To make the JavaScript more generic - you should be able to add parameters to the functions. Also, if you don't know which zone will be updated on the client (for instance, there's more than one zone), you'll need to set the zone on the server side using something like the following:
Hope this helps.
Posted by Matt Raible on January 25, 2006 at 07:45 PM MST #
Posted by Ronald Pieterse on February 09, 2006 at 08:44 PM MST #
Posted by Kurt Martinsen on February 14, 2006 at 02:23 PM MST #
Posted by Kalichar on May 24, 2006 at 12:03 AM MDT #
Posted by Rajesh on December 12, 2006 at 09:10 AM MST #
I got the following popup error when i submitted from edituser page (http://localhost:8080/equinox-ajax/editUser.html)
http://localhost:8080 org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException:Batch update returned unexpected row count from update: 0 actual rowcount:0 excepted:1
I couldnt add the user.
how this can be resolved.
Posted by gunny on December 19, 2006 at 03:11 AM MST #
var sortLinks = $('thead > tr > th > a');
var pagelinks =$('.pagelinks > a');
Posted by Vincent on January 18, 2007 at 03:49 PM MST #
Posted by irieb on January 21, 2007 at 06:52 PM MST #
Posted by Sanath on March 16, 2007 at 10:47 AM MDT #
Posted by Sanath on March 16, 2007 at 10:51 AM MDT #
Posted by Rose on May 16, 2007 at 07:50 AM MDT #
Hi All,
I have some problem with my code plz help me...........
This is my code for splitting the rows but in that i have some problem if i edit any row by the help of radio button, the first row is edited exctaly row was not edited.plz help me how can i edit the exact row........
Posted by Nagaraju on July 19, 2007 at 06:29 AM MDT #
Using this solution, I can now see that ajax is used when switching between pages. My problem is, when a new page is shown, the paging.banner.some_items_found (I'm using the default one) is for some reason corrupt and looks like this:
5Â 862 items found, displaying 5Â 851 to 5Â 862.[First/Prev] 191, 192, 193, 194, 195, 196 [Next/Last]
Any ideas why? It's a small problem but I don't know what's causing it.
//Vince
Posted by Vincent2 on May 05, 2008 at 03:13 PM MDT #
Posted by Dhaval on June 25, 2008 at 09:06 PM MDT #
Posted by Dhaval on June 25, 2008 at 09:09 PM MDT #
Posted by Dhaval on June 25, 2008 at 09:10 PM MDT #
Posted by dynamicd on August 01, 2008 at 07:03 PM MDT #
Posted by fer on September 16, 2008 at 02:49 PM MDT #
Is there a way to add href to column title only instead of relying on
It would be great if there was
With tableDecorator there is no way to get title name.
Posted by sj2004 on November 16, 2008 at 05:40 PM MST #
Posted by 196.12.61.89 on June 11, 2009 at 01:07 PM MDT #
Posted by 196.12.232.146 on January 21, 2010 at 03:15 PM MST #