return user to /viewprofile?partyId=XXXX after a service call

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

return user to /viewprofile?partyId=XXXX after a service call

Patrick-4
I have this page,
https://localhost:8443/partymgr/control/viewprofile?partyId=10451
call a form, the form invokes a service.  After the service I want to
return the user to the previous page.
Right now my controller looks like this, but I know its not right.
Do I need to build the URL in the service and pass it back to the
controller?

<request-map uri="AddFacility1">
    <security https="true" auth="false"/>
    <event type="service" invoke="AddFacilityService1" />
    <response name="success" type="view" value="viewprofile"/>
</request-map>
Reply | Threaded
Open this post in threaded view
|

Re: return user to /viewprofile?partyId=XXXX after a service call

Jacques Le Roux
Administrator
You simply need to pass the partyId from the called service using
    <response name="success" type="request" value="viewprofile"/>
of course you need to have/create a viewprofile request which calls the viewprofile view
You should deal also with error using
    <response name="error" type="view" value="viewprofile"/>

You may use request-redirect instead of request and then using redirect-parameter you don't need to pass the partyId from the called
service if the parameter is in the parameters map (ie when you call the service)

If you want to get back to a specific page after an action you may use save-last-view and view-last
You will find more in site-conf.xsd and I suggest to look at the examples in controller.xml files

HTH

Jacques

From: "Patrick" <[hidden email]>

>I have this page,
> https://localhost:8443/partymgr/control/viewprofile?partyId=10451
> call a form, the form invokes a service.  After the service I want to
> return the user to the previous page.
> Right now my controller looks like this, but I know its not right.
> Do I need to build the URL in the service and pass it back to the
> controller?
>
> <request-map uri="AddFacility1">
>    <security https="true" auth="false"/>
>    <event type="service" invoke="AddFacilityService1" />
>    <response name="success" type="view" value="viewprofile"/>
> </request-map>
>