You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Patrick <pa...@gmail.com> on 2010/03/19 22:57:33 UTC

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

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>

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

Posted by Jacques Le Roux <ja...@les7arts.com>.
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" <pa...@gmail.com>
>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>
>