Hi, I'm currently responsible for maintaining the Seam/Wicket integration for the Seam team. Seam maintains a "conversational" context, a session-based map that is keyed by an id associated with a set of requests. Previously the wicket integration worked by wrapping every redirect or outgoing url and adding the conversation id as a parameter, and then restoring the conversation based on that parameter in a servlet filter. While this works, it's ugly, and doesn't play with with various URL coding strategies.
So instead, I've been working on storing the conversational id in Page metadata. I did this by providing a new WebRequestCycleProcessor subclass which in resolve() looks for IPageRequestTarget or BookmarkablePageRequestTarget, pulls the page out, and restores the conversation if the parameter is present in metdata. Correspondingly, in respond(), I do the inverse. This works great when running in-container, but isn't playing well with tests that use ajax. When an ajax link is clicked in-container, the full request cycle is step()ed through. But BaseWicketTester.clickLink(), which I presume is the appropriate thing to use, does: AjaxLink link = (AjaxLink)linkComponent; setupRequestAndResponse(true); WebRequestCycle requestCycle = createRequestCycle(); callOnBeginRequest(requestCycle); AjaxRequestTarget target = new AjaxRequestTarget(link.getPage()); requestCycle.setRequestTarget(target); link.onClick(target); // process the request target processRequestCycle(requestCycle); This means that the link's onClick method is called before my request cycle hooks have a chance to restore conversational state. Is there an alternate way I should be hooking into wicket so that I can reliably intercept requests to pages and retrieve/store metadata? Thank you, -Clint -- View this message in context: http://www.nabble.com/Proper-hook-for-conversational-state-that-also-works-with-tests-tp21876375p21876375.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org