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

List:       tapestry-dev
Subject:    Token question
From:       Mikaël_Cluseau <nwrk () nwrk ! dyndns ! org>
Date:       2004-08-25 20:19:06
Message-ID: 412CF43A.3040008 () nwrk ! dyndns ! org
[Download RAW message or body]

Hello,

Sorry for the length of this post, but it is quite straighforward, I think.

I am wondering if it is possible to use a token (rendered in the URL or 
in form hidden field) to track the user "thread" of pages, using it to 
select the context of a page

Say we have two pages (First, with two search links, Second, with search 
results).

Results of link #1 are A, B and C.
Results of link #2 are D, E and G.

Here is the user action sequence :

1. Opens link #1 in a new window
2. Opens link #2 in the current window
3. Prefers results of the link #1, selects the second one (B costs $100, 
E $1,000,000, the link is a one clic purchase).

Here is the server side sequence without "threads" (using a persistent 
property, without plumbing code to handle something like the token I 
speak about):

after 1. shows results of link #1, saves them in the "results" property.
after 2. shows results of link #2, saves them, overiding the old value
          of "results".
after 3. rewinds the page and find the user wants E. Proceed the order
          for E.

In fact, the server "seen" First ==> (1) First/link$1 ==> (2) 
First/link$2 ==> (3) Second/link$2.

Here is the server side sequence with "threads" :


after 1. shows results of link #1, saves them in the "results" property.
after 2. shows results of link #2, opens a new thread, saves them, *NOT*
          overiding the old value of "results".
after 3. rewinds the page and find the user wants B. Proceed the order
          for B.

In fact, the server "seen" that :
First/thread1 ==> (1) First/thread1/link$1 ==> (3) Second/thread1/link$2
             `-==> (2) First/thread2/link$2

I understand that some people will think "Why do we need an token ?" "It 
just isn't necessary" and "How hard is it to use custom identifiers ?", 
but I think that a generic solution would be nice and, because it 
involves the link and form rendering, it should be done in the 
framework. This way, we could also add a property lifecycle of "thread".

Sincerely,
Mikael.

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

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

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