[
https://issues.apache.org/jira/browse/OFBIZ-1915?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12621350#action_12621350
]
Wickersheimer Jeremy commented on OFBIZ-1915:
---------------------------------------------
There is how it works in the controller.xml:
If you have a request that edit an entity, you can redirect to the view with:
(what it does is like request-redirect but only includes the allowed parameters)
<response name="success" type="request-redirect-filterparam"
value="viewXXX" allowed-params="XXXId"/>
If a request is creating an entity then you can redirect to its view with its
Id (it simply gets the parameters from the response attributes)
<response name="success" type="request-redirect-filterparam"
value="viewXXX" allowed-attributes="XXXId"/>
Both allowed-params and allowed-attribute can be used in the same redirect if
needed but i did not have a use case for that yet.
> Improving request redirects
> ---------------------------
>
> Key: OFBIZ-1915
> URL: https://issues.apache.org/jira/browse/OFBIZ-1915
> Project: OFBiz
> Issue Type: Improvement
> Components: framework
> Affects Versions: SVN trunk
> Reporter: Wickersheimer Jeremy
> Priority: Minor
> Fix For: SVN trunk
>
> Attachments: redirect.patch
>
>
> There are some issues with request-redirect and request-redirect-noparam, the
> former does not work very well with service multi and most of the time we do
> not need all the parameters to be in the redirected query, the later is a bit
> too radical.
> This is something that i have been thinking for a while when running into
> these two kind of issues:
> - when i want to redirect to a viewXXX page, i just want to have the XXXId
> in my redirect
> - after i create an entity i want to redirect to the viewXXX page with the
> XXXId visible in the query
> This patch i how we dealt with those in Opentaps, so maybe you are interested
> in applying to Ofbiz as well.
> The end result is nicer and more user friendly redirects.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.