Hi Jonas,

I'm not sure how any system can solve this problem, whether using orchestra or 
not.

Orchestra provides the orchestra:newConversation tag that can be wrapped around 
a link. The link should then open a new window. If the user can be persuaded to 
click on this link rather than using "open in new tab" then the problem is 
solved as the new page has a different "conversation context" and does not 
share beans with the original window. This provides a way for users to achieve 
multiple windows/tabs on the app, but it does require their co-operation.

But in your example, AFAIK there is absolutely no way for the server to tell 
the two tab windows apart. The server just sees a stream of post requests. 
There is an embedded "request id" that JSF uses to detect "back" button usage, 
and this will appear to bounce around rather as if the user is clicking "back" 
and "forward". Maybe somehow a heuristic could be used so that if req#50 is 
seen, then seen again then the second request is assumed to be from a different 
window. But the same pattern would be seen if the user clicks "refresh" or 
"back" so that doesn't seem workable.

I'm not very familiar with the trinidad "pageFlowScope", but I cannot imagine 
how it could solve this issue. The only solution I can see would involve 
browsers sending a "windowid" in the http headers. That would be fantastic, but 
I don't see it happening this decade.

If someone can describe a solution for this, I would be very happy indeed!

Cheers,

Simon


---- "Esser schrieb:
> Thank you, Simon for fixing the bug ORCHESTRA-13, but this takes me to my 
> next problem:
> 
> I explain a situation that is not the normal case, but it can happen:
> 
> First, a user should not try to edit more than one product in the same 
> conversationContext, because a conversationContext can only include one 
> conversation of the same type. Right?
> 
> myfaces-orchestra-examples-project - PetStore:
> If a user open a new browser tab or window e.g. by clicking "open link in new 
> tab" he gets two windows with the same conversationContext, then
> 1. Tab1: press edit "product A"
> 2. Tab2: press edit "product B"
> 3. Tab1: save "product A"
> 
> Finally the object "product B" gets all the attributes of object "product A". 
> Bad!
> What options are there to prevent this?
> 
> I have two solutions: 
> 
> 1. Using the separateConversationContext Tag
> 2. Using a pageFlowScope to store the objects
> 
> What do you think?
>  
> Regards,
> 
> Jonas
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Matthias 
> Wessendorf
> Gesendet: Donnerstag, 6. Dezember 2007 08:38
> An: MyFaces Discussion
> Betreff: Re: [orchestra] FacesGoodies and myfaces-orchestra-examples-project
> 
> http://code.google.com/p/facesgoodies
> 
> (do a SVN check-out)
> 
> On Dec 6, 2007 8:22 AM, simon <[EMAIL PROTECTED]> wrote:
> >
> > On Tue, 2007-12-04 at 20:30 +0100, Matthias Wessendorf wrote:
> > > > Test case I: FacesGoodies
> >
> > Where can I find the "FacesGoodies" code?
> >
> > > >
> > > > Test case II: myfaces-orchestra-examples-project - petstore
> > > >
> > > >
> > > >
> > > > 1. Enable administrator mode
> > > >
> > > > 2. Create Customer Group
> > > >
> > > > 3. Create Product
> > > >
> > > > 4. Go to Edit or Detail Page
> > > >
> > > >
> > > >
> > > > The result is a detail page without product set, because the url is 
> > > > wrong:
> > > >
> > > >
> > > >
> > > > ../mops/ProductDetail.faces?productId=&conversationContext=12
> >
> > Thanks for reporting this Jonas. I've confirmed it, and created a JIRA
> > issue for it.
> >
> > Regards,
> >
> > Simon
> >
> >
> 
> 
> 
> -- 
> Matthias Wessendorf
> 
> further stuff:
> blog: http://matthiaswessendorf.wordpress.com/
> sessions: http://www.slideshare.net/mwessendorf
> mail: matzew-at-apache-dot-org
> 
> 

Reply via email to