You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by bobheck <bo...@eds.com> on 2009/01/14 01:18:44 UTC

T5: Jump to Specific Page with Grid

I am trying to do something that seems simple, but I am stumped.

The grid pager renders links that look like this to jump to a specific page

pagepath/pagename.grid.pager/NN

where NN is the page number the link jumps directly to

I have a large list, and I want users to be able to type a number in a
Textfield and then return the grid back with that number as the starting
page, rather than keep hitting links to get where they want.  Some data is
over 1000 pages and it takes many clicks.

You can jump to a specific page by typing the URL with the .grid.pager/NN
appended, but I have not found a way to do this programmatically.  I tried
returning the string of the relative url but got an Exception - Tapestry
does not like the .grid.pager/NN when returned as an Object from an
@OnEvent.

I do not wish to give a fully qualified path in the return, I want to use
relative/friendly urls. 

Any help would be appreciated.
-- 
View this message in context: http://www.nabble.com/T5%3A-Jump-to-Specific-Page-with-Grid-tp21447583p21447583.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Jump to Specific Page with Grid

Posted by Jayson Pierringer <ja...@gemex.com>.
:)  No problem.  I was just playing with the pager yesterday because I 
had a problem with the page persisting between searches.  If I did a 
search and went to page three and then performed a new search it started 
on page three.  I wanted the new search to start on page one so I used 
the currentPage property to force it to page one if it was a new search.


bobheck wrote:
> Thank you Jayson !!!
>
> That was insanely simple.
>
> Nothing like spending a day and a half trying to do something only to find
> out the answer is to set a property.  Sigh.  (Walks off, muttering "You are
> a good coder....people like you....you are valuable...")
>
>
> Jayson Pierringer wrote:
>   
>> Bob,
>>
>> You can use the setCurrentPage method of your grid component.
>> myGrid.setCurrentPage(1)
>>
>> - Jayson
>>
>> bobheck wrote:
>>     
>>> I am trying to do something that seems simple, but I am stumped.
>>>
>>> The grid pager renders links that look like this to jump to a specific
>>> page
>>>
>>> pagepath/pagename.grid.pager/NN
>>>
>>> where NN is the page number the link jumps directly to
>>>
>>> I have a large list, and I want users to be able to type a number in a
>>> Textfield and then return the grid back with that number as the starting
>>> page, rather than keep hitting links to get where they want.  Some data
>>> is
>>> over 1000 pages and it takes many clicks.
>>>
>>> You can jump to a specific page by typing the URL with the .grid.pager/NN
>>> appended, but I have not found a way to do this programmatically.  I
>>> tried
>>> returning the string of the relative url but got an Exception - Tapestry
>>> does not like the .grid.pager/NN when returned as an Object from an
>>> @OnEvent.
>>>
>>> I do not wish to give a fully qualified path in the return, I want to use
>>> relative/friendly urls. 
>>>
>>> Any help would be appreciated.
>>>   
>>>       
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>>
>>     
>
>   



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Jump to Specific Page with Grid

Posted by bobheck <bo...@eds.com>.
Thank you Jayson !!!

That was insanely simple.

Nothing like spending a day and a half trying to do something only to find
out the answer is to set a property.  Sigh.  (Walks off, muttering "You are
a good coder....people like you....you are valuable...")


Jayson Pierringer wrote:
> 
> Bob,
> 
> You can use the setCurrentPage method of your grid component.
> myGrid.setCurrentPage(1)
> 
> - Jayson
> 
> bobheck wrote:
>> I am trying to do something that seems simple, but I am stumped.
>>
>> The grid pager renders links that look like this to jump to a specific
>> page
>>
>> pagepath/pagename.grid.pager/NN
>>
>> where NN is the page number the link jumps directly to
>>
>> I have a large list, and I want users to be able to type a number in a
>> Textfield and then return the grid back with that number as the starting
>> page, rather than keep hitting links to get where they want.  Some data
>> is
>> over 1000 pages and it takes many clicks.
>>
>> You can jump to a specific page by typing the URL with the .grid.pager/NN
>> appended, but I have not found a way to do this programmatically.  I
>> tried
>> returning the string of the relative url but got an Exception - Tapestry
>> does not like the .grid.pager/NN when returned as an Object from an
>> @OnEvent.
>>
>> I do not wish to give a fully qualified path in the return, I want to use
>> relative/friendly urls. 
>>
>> Any help would be appreciated.
>>   
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/T5%3A-Jump-to-Specific-Page-with-Grid-tp21447583p21457848.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: T5: Jump to Specific Page with Grid

Posted by Jayson Pierringer <ja...@gemex.com>.
Bob,

You can use the setCurrentPage method of your grid component.
myGrid.setCurrentPage(1)

- Jayson

bobheck wrote:
> I am trying to do something that seems simple, but I am stumped.
>
> The grid pager renders links that look like this to jump to a specific page
>
> pagepath/pagename.grid.pager/NN
>
> where NN is the page number the link jumps directly to
>
> I have a large list, and I want users to be able to type a number in a
> Textfield and then return the grid back with that number as the starting
> page, rather than keep hitting links to get where they want.  Some data is
> over 1000 pages and it takes many clicks.
>
> You can jump to a specific page by typing the URL with the .grid.pager/NN
> appended, but I have not found a way to do this programmatically.  I tried
> returning the string of the relative url but got an Exception - Tapestry
> does not like the .grid.pager/NN when returned as an Object from an
> @OnEvent.
>
> I do not wish to give a fully qualified path in the return, I want to use
> relative/friendly urls. 
>
> Any help would be appreciated.
>   



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org