On Thu, 2006-12-07 at 16:03 +0200, Mert Çalışkan wrote: > Yes.. > > Use a hashmap for this and put the tokens with a keyVal for each page, > e.g. with viewId. Yes, that's it, thanx!
> > And there is also another concern..Ajax frameworks...A workaround for > AjaxAnywhere can be stated like this: > For an AA request, requestHeaderMap contains a value with the key, > aaxmlrequest. So check for this if one exists in map. We're using ajax4jsf, that provides a method to check if a request is an ajax request. Btw. for which point in the JSF lifecycle did you configure your phaselistener? At first I had it relatively early placed (IIRC it was after RESTORE_VIEW) but encountered a problem where the wrong view was restored after a navigation action and afterwards a reload of the page: then the former view was rendered. For this usecase I'd expect to get the same page loaded again... So now it's applied after UPDATE_MODEL_VALUES. Cheers, Martin > > Regards, > > Mert.. > > > On 12/7/06, Martin Grotzke <[EMAIL PROTECTED]> wrote: > Hi Mert, > > On Wed, 2006-12-06 at 22:30 +0200, Mert Çalışkan wrote: > > Briefly, > > > > - A phaselistener that checks the session for a uniqueToken. > If there > > is none, generates a new one and stores it in session. If > there is > > one, checks the equality of that one with the one submitted > with form. > > - An extended formRenderer that renders the > session-scoped-uniqueToken > > as the hidden field to page. > > > > Of course this approach should be improved for popups and > frames ;) > Do you have experiences with this? > > These days I also implemented the solution with a phase > listener and an > extended form renderer and ran into issues with popups. > > Thanx in advance, > cheers, > Martin > > > > > > Regards, > > > > Mert.. > > > > > > On 12/6/06, Mike Kienenberger <[EMAIL PROTECTED]> wrote: > > You could also install a servlet filter that > serializes all > > requests > > for the same session. There are probably other > thread-safety > > issues > > when processing multiple requests simulaneously for > the same > > session > > under JSF 1.1. You'd still need to work through the > > double-click > > detection, but it'd be easier if you're assured that > no other > > request > > is occurring for the session. > > > > On 12/6/06, Adrian Mitev > <[EMAIL PROTECTED]> wrote: > > > Shale has component s:token that could handle > double submit. > > > > > > 2006/12/6, Charbel Abdul-Massih < > > [EMAIL PROTECTED]>: > > > > > > > > > > > > > > > > > > > > What's the best way to handle double clicks on > buttons in > > JSF??? > > > > > > > > > > > > > > > > Thanks, > > > > Charbel > > > > > > > > > -- > Martin Grotzke > http://www.javakaffee.de/blog/ > > > -- Martin Grotzke http://www.javakaffee.de/blog/
signature.asc
Description: This is a digitally signed message part

