Mailing List webobjects-dev@wocommunity.org Message #460
From: Ramsey Gurley <Ramsey.Gurley@practicemojo.com>
Subject: Re: [WO-DEV] Return to component from calling an external non-wo app
Date: Tue, 4 Jul 2023 23:25:13 +0000
To: WebObjects & WOnder Development <webobjects-dev@wocommunity.org>
I think that's just context().componentActionURL(). I believe you can also restore a page given the context().contextID() by calling session().restorePageForContextID(contextID) like ERD2WDirectAction does in previousPageFromRequest().



From: WebObjects & WOnder Development on behalf of Markus Ruggiero (rucotec)
Sent: Tuesday, July 4, 2023 9:03 PM
To: WebObjects & WOnder Development
Subject: [WO-DEV] Return to component from calling an external non-wo app

I need to call an external app for some interactive stuff. The call to that app allows to pass a URL that will be called upon the user is done on the external site. Our user is woking inside a complex component and eventually needs to go externally for some specific tasks. Going to said external app happens with a POST request and a ton of XML in the request body. I can do this, that’s all working. One item in the posted XML is an (optional) return URL.

How can I create this return URL so that the user transparently comes back to where they left off? I also need to act on this (the user coming back from the external site) to download info about what the user has done over there. This downloading of the results is another XML posted to the external site, their response however is then an XML which I need to parse (that is not a problem). 

I am looking for strategies and possible code snippets for such a scenario, particularly the creation of the return URL. I want this to kind of work like the user doing a reload on the current page (a.k.a. return null). I was thinking of passing some parameter along with the URL (?comingBack=true) that will then trigger the request to get back the data from the external site. This could be done in appendToResponse() with checking for comingBack == true.

So my primary issue is how to create a URL for the current component that has the same effect as “reload” (and mind you we are inside a (WO)Session and cannot lose this context).

Thanks for your help and ideas
---markus---


Markus Ruggiero


rucotec GmbH                        web https://rucotec.ch
Leonhardsberg 1                   email markus.ruggiero@rucotec.ch
4051 Basel / Switzerland         mobile +41 79 508 4701









Confidentiality Notice: This email, including all attachments and replies thereto, are covered by the Electronic Communications Privacy Act, 18 U.S.C. Sections 2510-2521 and are legally privileged. This information is confidential, and intended only for the use of the individuals or entities named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or the taking of any action in reliance on the contents of this transmitted information is strictly prohibited. Please notify us if you have received this transmission in error. Thank you.
Subscribe (FEED) Subscribe (DIGEST) Subscribe (INDEX) Unsubscribe Mail to Listmaster