Replay request
Replay request
- Subject: Replay request
- From: André Rothe via Webobjects-dev <email@hidden>
- Date: Fri, 10 Nov 2023 09:09:01 +0100
Hi,
I try to replay an old WORequest after some other
request/response-loops, but I don't know, how it could work.
My application validates some values after the user clickes somewhere on
a page. In the validation routine I don't know, which action the user
has executed exactly. But the validation can be wrong, so I display
another page (an overlay dialog over the current page), where the user
can decide between "Cancel" and "Proceed". On "Cancel" I return the
current page without the overlay, on "Proceed" I fix the problem in the
validation and now I can go back to the current page too, but the user
has to execute his action again.
Can I automatically execute the previous request? I can store the
context-Id of the source page (before overlay) like:
String oldCtxId = context().contextId();
WORequest oldReq = context().request();
and after the data fixes (user has clicked on "Proceed", WO calls the
associated action like proceedChangeAction() on my page component) I
could restore the source page from the cache:
WOComponent oldPage = session().restorePageForContextID(oldCtxId);
And now I could send the "oldReq" to the component "oldPage". How can I
do that, to solve the problem?
Thanks a lot
André
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden