On 21.12.2007, at 22:33, Marcus Schulte wrote: > 2007/12/21, Kaspar Fischer : >> >> >> On 20.12.2007, at 18:16, >> 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. > > > Sounds like what you really want is client-side persistence. This > will store > your page-state in the URL - or in a hidden field, if your page > uses forms. > So, to be concrete, if you're having a non-null property annotated > with > @Persist("client"), or tagged appropriately in the .page xml-File, > your > direct Link will, magically, render as something like: > > http://localhost:8080/myapp/app? > component=dl&page=Home&service=direct&state:Home=BrO0ABXcQAAAAAQAACXRy > aWdnZXJlZHQAATE%3D > > The funny String making up the value of the parameter "state:Home" is > actually the Base64 encoded version of your page-state. That way, a > user > opnening several instances of your page in multiple browser windows/ > tabs > will see what he expects (possibly ;)) ;-) Well, I think this was it! I've managed to get the state:... into my direct links and I think that's all I need. Unfortunately, the links (to sort) on my Contrib:Table on my page still look as follows http://localhost:8080/kc/ SectionPage,tableColumnComponent.linkColumn.sdirect?container=Contrib% 3ASimpleTableColumnPage&sp=ASectionPage%2C% 24SectionTagQueryListElement.% 24SortableNodeTable.table.tableView&sp=SnodeTableTitle No trace of a state:...! Do you happen to know how to achieve this? Or is it a missing feature of Contrib:Table? > Btw., don't worry about asking basic questions, that's ok, of course. That's very encouraging! And I want to make a compliment: You help is very kind and I appreciate it a lot! Kaspar --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org For additional commands, e-mail: users-help@tapestry.apache.org