Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-2850

paramsPrepareParams stack should execute checkbox interceptor earlier

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.2
    • 2.1.8
    • Integration
    • None

    Description

      The current paramsPrepareParams interceptor executes the checkbox interceptor late in the chain, which results in the 2 params interceptor not applying the same parameter set if there are checkboxes.
      Instead, it should look like :

      <interceptor-stack name="paramsPrepareParamsStack">
      <interceptor-ref name="exception"/>
      <interceptor-ref name="alias"/>
      <interceptor-ref name="i18n"/>
      <interceptor-ref name="checkbox"/>
      <interceptor-ref name="params"/>
      <interceptor-ref name="servletConfig"/>
      <interceptor-ref name="prepare"/>
      <interceptor-ref name="chain"/>
      <interceptor-ref name="modelDriven"/>
      <interceptor-ref name="fileUpload"/>
      <!-- BAD <interceptor-ref name="checkbox"/>-->
      <interceptor-ref name="staticParams"/>
      <interceptor-ref name="actionMappingParams"/>
      <interceptor-ref name="params"/>
      <interceptor-ref name="conversionError"/>
      <interceptor-ref name="validation">
      <param name="excludeMethods">input,back,cancel</param>
      </interceptor-ref>
      <interceptor-ref name="workflow">
      <param name="excludeMethods">input,back,cancel</param>
      </interceptor-ref>
      </interceptor-stack>

      The additional bonus is that you get rid of stupid OGNL exceptions trying to set _checkbox* parameters during the first params execution

      regards,
      Sami Dalouche

      Attachments

        Activity

          People

            Unassigned Unassigned
            samokk Sami Dalouche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: