Yes, I've done this with AjaxAnywhere - here's the source:

<aa:zone name="userTable">

<display:table name="users" class="list" requestURI="" id="userList" export="true" excludedParams="*" pagesize="8" sort="list">
    <display:setProperty name="export.pdf.filename" value="users.pdf" />
    <display:column property="id" sort="true" href="">         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" media="html" sort="true" sortProperty="birthday">
        <fmt:formatDate value="${userList.birthday}" pattern="${datePattern}"/>
    </display:column>
    <display:column sort="true" titleKey="user.birthday" media="csv xml excel pdf">
        <fmt:formatDate value="${userList.birthday}" pattern="${datePattern}"/>
    </display:column>
</display:table>

</aa:zone>

<script type="text/_javascript_">
    ajaxAnywhere.getZonesToReaload = function() { return "userTable" }
    ajaxAnywhere. { 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);
        var pagelinks = document.getElementsByClassName('pagelinks')[0]
                                .getElementsByTagName('a');
        ajaxifyLinks(pagelinks);
    }
    function ajaxifyLinks(links) {
        for (i=0; i < links.length; i++) {
            links[i]. {
                ajaxAnywhere.getAJAX(this.href);
                return false;
            }
        }
    }
    replaceLinks();
   
</script>

<span id="cnt">0</span> seconds since last page refresh.
<script>
    var sec=0;
    function counter(){
        setTimeout("counter();",1000);
        document.getElementById("cnt").innerHTML = sec++;
    }
    counter();
</script>


On 10/5/05, Yee, Richard K, CTR,, DMDCWEST <[EMAIL PROTECTED]> wrote:
Displaytag Users,
Has anyone tried changing the default behavior of the displaytag paginated
list navigation links to invoke _javascript_ functions in order to use AJAX
for displaying a table?

-Richard


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to