how to use ajax displaytag?

View: New views
4 Messages — Rating Filter:   Alert me  

how to use ajax displaytag?

by fireapple :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here's my situation:

I used a displaytag to show a table as an ajax result. It works fine.

However, when I click "sort" or go to different page, it opens a new page with only the displaytag table. I saw something online that there's ajaxTags or ajaxAnywhere, but it seems they're both not good.

Is JQuery a good solution for this issue? I found this:
http://vijay360.wordpress.com/2008/03/12/displaytag-jquery-displaytagajaxed/

<display:table name="sessionScope.group_query_list" requestURI="group_queryGroups.do" pagesize="20">

Re: how to use ajax displaytag?

by Oscar Calderón-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

fireapple escribió:

> Here's my situation:
>
> I used a displaytag to show a table as an ajax result. It works fine.
>
> However, when I click "sort" or go to different page, it opens a new page
> with only the displaytag table. I saw something online that there's ajaxTags
> or ajaxAnywhere, but it seems they're both not good.
>
> Is JQuery a good solution for this issue? I found this:
> http://vijay360.wordpress.com/2008/03/12/displaytag-jquery-displaytagajaxed/
>
> <display:table name="sessionScope.group_query_list"
> requestURI="group_queryGroups.do" pagesize="20">
>
>  
Well, it depends of the display table's configuration. In display table
tag you can set the request uri to get the list that fills the table
when you sort column or navigate with pagination. I don't know if you
set the display table inside a ajax refresh div or something like that,
if that's the case i think that requestUri of your display table must
target to action method that gets you to the page, not the method that
is called via ajax.

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


Re: how to use ajax displaytag?

by reiern70 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Recently I just created a wrapper for jqgrid... Maybe it can be of some help
to you

http://code.google.com/p/antilia-struts/wiki/DemoApplication
http://code.google.com/p/antilia-struts/wiki/SearchPage

<http://code.google.com/p/antilia-struts/wiki/SearchPage>Ernesto

On Thu, Nov 12, 2009 at 10:29 PM, fireapple <taizhang1981@...> wrote:

>
> Here's my situation:
>
> I used a displaytag to show a table as an ajax result. It works fine.
>
> However, when I click "sort" or go to different page, it opens a new page
> with only the displaytag table. I saw something online that there's
> ajaxTags
> or ajaxAnywhere, but it seems they're both not good.
>
> Is JQuery a good solution for this issue? I found this:
>
> http://vijay360.wordpress.com/2008/03/12/displaytag-jquery-displaytagajaxed/
>
> <display:table name="sessionScope.group_query_list"
> requestURI="group_queryGroups.do" pagesize="20">
>
> --
> View this message in context:
> http://old.nabble.com/how-to-use-ajax-displaytag--tp26326770p26326770.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@...
> For additional commands, e-mail: user-help@...
>
>

Re: how to use ajax displaytag?

by fireapple :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, I changed action in requestUri from ajax to a normal one. Now sorting and paging work fine although it's not ajax.

Is it possible to do the sorting and paging in an ajax way?

Oscar Calderón-2 wrote:
Well, it depends of the display table's configuration. In display table
tag you can set the request uri to get the list that fills the table
when you sort column or navigate with pagination. I don't know if you
set the display table inside a ajax refresh div or something like that,
if that's the case i think that requestUri of your display table must
target to action method that gets you to the page, not the method that
is called via ajax.

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