[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    Re: Help needed with DirectLink and page parameters (Was: Contrib:Table and page parameters)
From:       Kaspar Fischer <fischerk () inf ! ethz ! ch>
Date:       2007-12-21 19:43:46
Message-ID: 2929BB46-EC68-4933-824D-072F705803F1 () inf ! ethz ! ch
[Download RAW message or body]


On 20.12.2007, at 18:16, <Marcus.Schulte@bmw.ch>  
<Marcus.Schulte@bmw.ch> wrote:
>> Does this mean that Tapestry will keep in its page pool an
>> IExternalPage page for each article I have in the DB (once
>> this page is visited)?
>
> Please refer to
>  http://tapestry.apache.org/tapestry4.1/usersguide/state.html
> Tapestry will keep in its pool one instance for each *concurrent
> request* it is serving. Your persistent page-id will be stored in the
> session or on the client (configurable).
> When a request comes in, Tapestry will pick a page from the pool and
> provide it with the persistent property data, e.g. the reference to  
> your
> db-data.

I don't see how this solves my problem of emitting DirectLinks with
parameters into the page. If I understand you correctly, you say that
by using persisted properties, my DirectLinks do not need to contain
the page's parameters, right?

Suppose my article page contains a link to download the article. This
link is implemented via a DirectLink. Suppose now the user opens two  
tabs,
in this order:

   http://my.org/app?page=Article&id=1
   http://my.org/app?page=Article&id=2

After this, the session holds "id=2". Now the user clicks the download
link in the former page (id=1). As this DirectLink does not contain  
"id=1"
the user will get article 2. That's not what the user expects.

Do I misunderstand this?

It seems to me that persistent properties do not solve the problem. I
need a way to tell DirectLink to look up the current external page's
parameter's and embed them in the link.

Kaspar

P.S. I understand that I can pass additional parameters to the  
DirectLink
by setting its "parameters" parameter. Still, I am posting because
I do not understand Tapestry's idea of handling page parameters:  For
instance, I want to use Contrib:Table on my page. It emits lots of links
(links to sort the table). But if these links do not contain my page
parameters, the page will not render when the user clicks to sort the
table. That's why I ask how to do this with a simple DirectLink --  
although
my actual problem is Contrib:Table, and possibly other components.

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic