Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-9537

In case of request redirect context filter override the redirect parameter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Implemented
    • 16.11.03, Trunk
    • 17.12.01
    • None
    • None

    Description

      In case of request redirect ContextFilter override the redirect parameter
      Like if you use following pattern

      <request-map uri="createTask">
        <security https="true" auth="true"/>
        <event type="service" invoke="createWorkEffort"/>
        <response name="success" type="request-redirect" value="ViewWorkEffort">
          <redirect-parameter name="workEffortId" from="workEffortParentId"/>
        </response>
        <response name="error" type="request" value="ViewWorkEffort"/>
      </request-map>
      

      In this case service creates new workEffort and put the newly created workEffortId in requestAttribute,
      but in response we are redirecting parentWorkEffortId as workEffortId,
      so in this case context filter override the workEffortId that passed as redirect parameter, and replace it with newly created workEffortId.

      This is due to restoring all the redirected parameter instead of default one.
      Need to restore only success/error message so redirected page can display previous request's error msg etc.
      This is handled in RequestHandler.java.

      As in case of request redirect we pass the redirect parameter name so instead of restoring all the previous redirected parameter restore only error/success message related parameter.

      Attachments

        1. OFBIZ-9537.patch
          4 kB
          Deepak Dixit
        2. OFBIZ-9537.patch
          1 kB
          Deepak Dixit

        Issue Links

          Activity

            People

              deepak Deepak Dixit
              deepak Deepak Dixit
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: