It's nice to at least know you've had the same problem. Your code below represents exactly what I'm after, but I so far haven't found any practical way to make it work. I've tried things like creating my own POST (using HttpClient) within the current request cycle, but dealing with this "inner" response while servicing the original response is pretty messy and generally involves a bad hack to the Tapestry request cycle. Hopefully someone else already has a solution, but otherwise I plan to come up with something more graceful than a "sorry, I'm too stupid to service your request" page.
Thanks, Shawn Quoting Sam Gendler <[EMAIL PROTECTED]>: > I can think of a couple of ways of doing this. The way I do this is > to use an ExternalCallback, store that in session, and after > successful authentication, I just execute the callback. However, > this > only works if you use ExternalLinks, and doesn't work at all if > someone submits a form after being away from their computer for long > enough to lose their session. > > Here's what would be really useful, but doens't actually work, > currently: > > If you have their serviceParameters, you shouldn't need to put them > back in a request via the URL of the age, I think. You should just > be > able to do something like this in your listener after they've > successfully authenticated: > > @Persist > public abstract IPage getPreviousPage(); > public abstract void setPreviousPage(IPage page) > > @Persist > public abstract Object[] getStoredServiceParameters(); > public abstract void setStoredServiceParameters(Object[] params); > > public void doSomething(IRequestCycle cycle) { > // check auth here > > if (authSuccess) { > cycle.setServiceParameters(getStoredServiceParameters()); > cycle.activate(getPreviousPage()); > return; > } > } > > Unfortunately, when a page is activated, it doesn't go through a > rewind cycle, so even if the service parameters have all the right > info (and I'm not sure they do), the fields of your new page would > not > be populated with the data. > > I never found a solution to this, so my app has ExternalLinks > everywhere I can get them, and if you submit a form hours after you > loaded it, you just have to suffer through the process of filling it > out again manually. It is more than a little frustrating, but after > fighting with this problem for a good long while, I gave up on it. > > I'd love to find a way to force a page to go through the entire > rewind/render cycle programmatically from a listener on another page, > but there doesn't seem to be a way to do this. > > --sam > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]