Uploaded image for project: 'Jetspeed (Retired)'
  1. Jetspeed (Retired)
  2. JS1-418

GenricMVCAction.java navigation doesn't work

Details

    • Bug
    • Status: Resolved
    • Resolution: Won't Fix
    • 1.4
    • None
    • Portlets
    • None
    • Operating System: All
      Platform: All
    • 24701

    Description

      The doPerform(...) call in the catch block moved outside the catch block.

      THE BUG:
      ========
      protected void perform(RunData rundata)
      throws Exception
      {

      Context context = getContext(rundata);

      if ((context != null) && (rundata.getParameters().getString("action") !=
      null))

      { // if context is already defined and Actions defined, events // have already been processed, call doPerform logger.debug("Action detected with action + context"); doPerform(rundata, context); }
      else
      {

      // if context is null, create a new one
      if (context == null)
      { logger.debug("Action: building action context"); context = new GenericMVCContext(); rundata.getTemplateInfo().setTemplateContext("VelocityActionContext", context); }

      try
      {

      // process implicit ActionEvent invocation
      logger.debug("Action: try executing events");

      GenericMVCPortlet portlet = (GenericMVCPortlet)
      context.get("portlet");

      if (portlet != null)
      {

      // verify this portlet is the one requested by checking the
      // js_peid request var. If there is no js_peid
      // do not worry a about verifing. helps with backward compat.
      if (rundata.getParameters().getString("js_peid") == null ||
      PortletSessionState.isMyRequest(rundata, portlet))
      { executeEvents(rundata, context); }
      else
      { logger.debug("Action: calling doPerform"); doPerform(rundata, context); }
      }
      else
      { executeEvents(rundata, context); }
      }
      catch (NoSuchMethodException e)
      { // no event selected, process normal context generation logger.debug("Action: calling doPerform"); }
      doPerform(rundata, context);//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
      }
      }

      THE SOLUTION:
      =============
      protected void perform(RunData rundata)
      throws Exception
      {

      Context context = getContext(rundata);

      if ((context != null) && (rundata.getParameters().getString("action") !=
      null))
      { // if context is already defined and Actions defined, events // have already been processed, call doPerform logger.debug("Action detected with action + context"); doPerform(rundata, context); }

      else
      {

      // if context is null, create a new one
      if (context == null)

      { logger.debug("Action: building action context"); context = new GenericMVCContext(); rundata.getTemplateInfo().setTemplateContext("VelocityActionContext", context); }

      try
      {

      // process implicit ActionEvent invocation
      logger.debug("Action: try executing events");

      GenericMVCPortlet portlet = (GenericMVCPortlet)
      context.get("portlet");

      if (portlet != null)
      {

      // verify this portlet is the one requested by checking the
      // js_peid request var. If there is no js_peid
      // do not worry a about verifing. helps with backward compat.
      if (rundata.getParameters().getString("js_peid") == null ||
      PortletSessionState.isMyRequest(rundata, portlet))

      { executeEvents(rundata, context); }

      else

      { logger.debug("Action: calling doPerform"); doPerform(rundata, context); }

      }
      else

      { executeEvents(rundata, context); }

      }
      catch (NoSuchMethodException e)

      { // no event selected, process normal context generation logger.debug("Action: calling doPerform"); doPerform(rundata, context); //<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< }

      }
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            a.herz@freegroup.de Andreas Herz
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment