Oops!  I must have been looking at the wrong thing.  I see now that the
sort and dir parameters are passed when paging.  Not sure why I thought
that they were not.  This makes sense.

Thanks,
Ken 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Hoying, Ken
Sent: Wednesday, November 28, 2007 9:25 AM
To: displaytag-user@lists.sourceforge.net
Subject: Re: [displaytag-user] [Q] Paging & Sorting

I am creating a new PaginatedList with each request.  If not, I would
have to maintain its state between requests somewhere, like the session.
Correct???
 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of John
Sent: Wednesday, November 28, 2007 8:45 AM
To: displaytag-user@lists.sourceforge.net
Subject: Re: [displaytag-user] [Q] Paging & Sorting

Hi Ken,

but surely if you have implemented PaginatedList then you have sort
direction and sort criterion fields which were set from the last
request, if they havent changed then they will remain, unless you are
creating a new object for each request, in which case you might get a
NullPointer or some other exception.

I could be wrong though, things might be being managed on the session.

John.

Hoying, Ken wrote:
> Here is the scenario that I am not clear on...
> 
> I open my page.  I then choose to sort by a different column by 
> clicking on that column.  This is accomplished in DisplayTag by that 
> column being a link which passes the "sort" and "dir" parameters with 
> the expected values to properly sort the column.  The new page is 
> rendered with the newly requested sort.
> 
> There are more results than will be displayed on the page due to the 
> page size that has been set.  As a result, I have the links across the

> top to page through the results.  These links include the "page"
> parameter which specifies which page is to be shown.  However, these 
> links do not include the "sort" and "dir" parameters, as I would have 
> expected.  Yet when I choose a new page be selecting the link, my 
> sorting selection from earlier is maintained.
> 
> How is this possible?  Is DisplayTag somehow storing this information 
> in the session between invocations?
> 
> Thanks,
> Ken
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> John
> Sent: Tuesday, November 27, 2007 6:10 PM
> To: displaytag-user@lists.sourceforge.net
> Subject: Re: [displaytag-user] [Q] Paging & Sorting
> 
> it is storing it in your PaginatedList implementation :-)
> 
> Hoying, Ken wrote:
>> I am using the PaginatedList interface.  However, how does DisplayTag

>> keep track of the currently sorted column and direction when paging?
>> Is it storing this information in the session some where?
>>
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of 
>> John
>> Sent: Tuesday, November 27, 2007 11:59 AM
>> To: displaytag-user@lists.sourceforge.net
>> Subject: Re: [displaytag-user] [Q] Paging & Sorting
>>
>> are you using the PaginatedList interface? If so, it does it all for 
>> you, the problem is that when you set the page size you'll want the
> user
>>   defined parameters, sort direction, sort column etc.. to remain the

>> same, in which case you'll have to set them in your paginatedList 
>> implementation yourself.
>>
>> I came across this problem when deleting objects from a list, if the 
>> user has 10 objects per page and 11 objects in total they see 2 
>> pages,
> 
>> if they go to page 2 and delete one of the objects the displayTag 
>> will
> 
>> remain on page two, hence the user sees an empty list, what should 
>> happen is they jump to page onbe, as they now have only ten objects, 
>> hence I must set the page number manually to one.
>>
>> Hope that helps,
>>
>> John.
>>
>> Hoying, Ken wrote:
>>> Interestingly, when using external sorting everything seems to work 
>>> fine.  There is no form object as not form is submitted.  The paging

>>> and sorting changes are links which pass the parameters in the query
>> string.
>>> Interestingly, the paging links do not contain sorting information, 
>>> yet, the sorting seems to be honored.  I am trying to figure out how

>>> that is possible???
>>>
>>> -----Original Message-----
>>> From: [EMAIL PROTECTED]
>>> [mailto:[EMAIL PROTECTED] On Behalf Of 
>>> John
>>> Sent: Tuesday, November 27, 2007 11:20 AM
>>> To: displaytag-user@lists.sourceforge.net
>>> Subject: Re: [displaytag-user] [Q] Paging & Sorting
>>>
>>> Hi Ken,
>>>
>>> You will have to put these details in your form object if you are 
>>> sorting externally.
>>>
>>> John.
>>>
>>> Hoying, Ken wrote:
>>>> I noticed that when paging through results that are sorted, 
>>>> DisplayTag does not include any sorting parameters in the URL that 
>>>> it generates for the paging links. It just includes the page
number.
> 
>>>> I am trying to understand then how DisplayTag know which column 
>>>> needs to be
>>> sorted.
>>>> Does anyone know how this works?
>>>>
>>>> Thanks in advance,
>>>> Ken
>>>>
>>>> -------------------------------------------------------------------
>>>> -
>>>> -
>>>> -
>>>> --
>>>>
>>>> * ***Note:The information contained in this message may be 
>>>> privileged and confidential and protected from disclosure. If the 
>>>> reader of this message is not the intended recipient, or an 
>>>> employee or agent responsible for delivering this message to the 
>>>> intended recipient, you are hereby notified that any dissemination,

>>>> distribution or copying of this communication is strictly 
>>>> prohibited. If you have received this communication in error, 
>>>> please notify the Sender immediately by replying to the message and

>>>> deleting it from your computer. Thank
>> you.
>>>> Premier Inc. *
>>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> -
>>>> -
>>>> -
>>>> --
>>>>
>>>> -------------------------------------------------------------------
>>>> -
>>>> -
>>>> -
>>>> --- This SF.net email is sponsored by: Microsoft Defy all
> challenges.
>>>> Microsoft(R) Visual Studio 2005.
>>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> -
>>>> -
>>>> -
>>>> --
>>>>
>>>> _______________________________________________
>>>> displaytag-user mailing list
>>>> displaytag-user@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/displaytag-user
>>> --------------------------------------------------------------------
>>> -
>>> -
>>> --
>>> -
>>> This SF.net email is sponsored by: Microsoft Defy all challenges.
>>> Microsoft(R) Visual Studio 2005.
>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>> _______________________________________________
>>> displaytag-user mailing list
>>> displaytag-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/displaytag-user
>>>
>>> --------------------------------------------------------------------
>>> -
>>> -
>>> --- This SF.net email is sponsored by: Microsoft Defy all
challenges.
> 
>>> Microsoft(R) Visual Studio 2005.
>>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>>> _______________________________________________
>>> displaytag-user mailing list
>>> displaytag-user@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/displaytag-user
>>>
>>
>> ---------------------------------------------------------------------
>> -
>> --
>> -
>> This SF.net email is sponsored by: Microsoft Defy all challenges.
>> Microsoft(R) Visual Studio 2005.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> displaytag-user mailing list
>> displaytag-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/displaytag-user
>>
>> ---------------------------------------------------------------------
>> -
>> --- This SF.net email is sponsored by: Microsoft Defy all challenges.

>> Microsoft(R) Visual Studio 2005.
>> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
>> _______________________________________________
>> displaytag-user mailing list
>> displaytag-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/displaytag-user
>>
> 
> 
> ----------------------------------------------------------------------
> --
> -
> SF.Net email is sponsored by: The Future of Linux Business White Paper

> from Novell.  From the desktop to the data center, Linux is going 
> mainstream.  Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> _______________________________________________
> displaytag-user mailing list
> displaytag-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/displaytag-user
> 
> ----------------------------------------------------------------------
> --- SF.Net email is sponsored by: The Future of Linux Business White 
> Paper from Novell.  From the desktop to the data center, Linux is 
> going mainstream.  Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> _______________________________________________
> displaytag-user mailing list
> displaytag-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/displaytag-user
> 


------------------------------------------------------------------------
-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

------------------------------------------------------------------------
-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
displaytag-user mailing list
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to