Portals Bridges
  1. Portals Bridges
  2. PB-74

Safe creation of context in GenericVelocityPortlet for JS2's new feature, auto-dispatching for edit_defaults mode.

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.3
    • Fix Version/s: 1.0.4
    • Component/s: velocity
    • Labels:
      None
    • Environment:
      Probably on Jetspeed-2.1.3 or later. (Jetspeed-2.1.3 will probably be released soon.)
      When the option, auto-dispatching for edit_defaults mode is turned on.

      Description

      The GenericVelocityPortlet assumes that doEdit() method would be invoked after render() method.
      And, it creates a context in overriden render() method for later use.
      However, if JS2's auto-dispatching for edit_defaults mode option is turned on, JS2 would try to invoke doEdit() method directly without invoking render() method.
      Meanwhile, if a GenericVelocityPortlet is not invoked via render() method, it will throw an NPE because the context is null.
      So, the context object should be treated safer in doEdit() phase. That is, if the context is null in doEdit() phase, it should initialize there for more safety.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Woonsan Ko
            Reporter:
            Woonsan Ko
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development