You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@click.apache.org by Andrew Schoener <an...@gmail.com> on 2011/11/07 00:00:10 UTC

pagination, stateful pages, and multiple tables

Hi,

I have been experimenting with a page that has a table, including a
"details" ActionLink column.  I want the user to click the"details" link,
then below the main table, show a child table of detail data that is
related to the row clicked above.  In other words, displaying classic
master/detail database information in a single html page.

Since I have a lot of data, I am going to have pagination.  And for nicer
usability, have created the page to be stateful on the master table.

So far, I have it all working.  When I click my "details" link, I get my
detail click table underneath.

Except...  I have notice that if I am on page 2 of the master table, and
let's say I click a details link and get a detail click table, and let's
also say that the detail table has enough data to itself have pagination.
It appears that the page number clicked is saved in the query string as a
generic "page=X" value, and it confuses both my master and my detail
table.  Getting back to my example, I am on page 2 of the master table.
But I want to click page 3 of the detail table.  Upon refresh, I go to page
3 on the master.

Any way to assign pagination values when playing with multiple click tables
within the same logical page?

Andy

Re: pagination, stateful pages, and multiple tables

Posted by Andrew Schoener <an...@gmail.com>.
Bob,

I've tried this two ways:

   1. Having both my master and my detail click tables built in the page's
   constructor.
   2. Having the master click table built in the page constructor but
   having the detail click table built in the onLinkClick method associated to
   the master table's action link

There doesn't seem to be much diference in the above approached other than
when the detail table becomes visible.  With both approaches, I think the
root problem is that the URL only has a single "page=X" value even though I
have 2 tables having pagination on the same page.

For example:

http://localhost:8084/ABC/system/mypage.htm?actionLink=table-controlLink&*
page=2*

What I really need is a way to have 2 page trackers in the URL:
pageMaster=X and pageDetail=Y.
Or I wonder if I need to build these as separate panels?  I haven't looked
into that feature of click yet.

Andy



On Sun, Nov 6, 2011 at 11:03 PM, Bob Schellink <sa...@gmail.com> wrote:

> Hi Andy,
>
> I've not used master/detail on the same page before but  controls are only
> processed if their respective action link is clicked. In the URL you will
> notice the parameter "actionLink=masterTable&page=**3". The actionLink
> will indicate which table Click should process. Are you manually processing
> the table at some stage?
>
> regards
>
> Bob
>
>
>
> On 2011/11/07 01:00 AM, Andrew Schoener wrote:
>
>> Hi,
>>
>> I have been experimenting with a page that has a table, including a
>> "details" ActionLink column.  I
>> want the user to click the"details" link, then below the main table, show
>> a child table of detail
>> data that is related to the row clicked above.  In other words,
>> displaying classic master/detail
>> database information in a single html page.
>>
>> Since I have a lot of data, I am going to have pagination.  And for nicer
>> usability, have created
>> the page to be stateful on the master table.
>>
>> So far, I have it all working.  When I click my "details" link, I get my
>> detail click table underneath.
>>
>> Except...  I have notice that if I am on page 2 of the master table, and
>> let's say I click a details
>> link and get a detail click table, and let's also say that the detail
>> table has enough data to
>> itself have pagination.  It appears that the page number clicked is saved
>> in the query string as a
>> generic "page=X" value, and it confuses both my master and my detail
>> table.  Getting back to my
>> example, I am on page 2 of the master table.  But I want to click page 3
>> of the detail table.  Upon
>> refresh, I go to page 3 on the master.
>>
>> Any way to assign pagination values when playing with multiple click
>> tables within the same logical
>> page?
>>
>> Andy
>>
>>
>

Re: pagination, stateful pages, and multiple tables

Posted by Bob Schellink <sa...@gmail.com>.
Hi Andy,

I've not used master/detail on the same page before but  controls are only processed if their 
respective action link is clicked. In the URL you will notice the parameter 
"actionLink=masterTable&page=3". The actionLink will indicate which table Click should process. Are 
you manually processing the table at some stage?

regards

Bob


On 2011/11/07 01:00 AM, Andrew Schoener wrote:
> Hi,
>
> I have been experimenting with a page that has a table, including a "details" ActionLink column.  I
> want the user to click the"details" link, then below the main table, show a child table of detail
> data that is related to the row clicked above.  In other words, displaying classic master/detail
> database information in a single html page.
>
> Since I have a lot of data, I am going to have pagination.  And for nicer usability, have created
> the page to be stateful on the master table.
>
> So far, I have it all working.  When I click my "details" link, I get my detail click table underneath.
>
> Except...  I have notice that if I am on page 2 of the master table, and let's say I click a details
> link and get a detail click table, and let's also say that the detail table has enough data to
> itself have pagination.  It appears that the page number clicked is saved in the query string as a
> generic "page=X" value, and it confuses both my master and my detail table.  Getting back to my
> example, I am on page 2 of the master table.  But I want to click page 3 of the detail table.  Upon
> refresh, I go to page 3 on the master.
>
> Any way to assign pagination values when playing with multiple click tables within the same logical
> page?
>
> Andy
>