ICEfaces
  1. ICEfaces
  2. ICE-6765

NullPointerException being thrown from DeltaSubmitParametersPropagation.handleNavigation(FacesContext, String, String) during ace:fileEntry file upload

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-2.0.0.GA, 3.0
    • Fix Version/s: EE-2.0.0.GA, 2.0.2
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Liferay 6.0.6 + Tomcat 6.0.29 + PortletFaces Bridge 2.0.0-SNAPSHOT (April 7th, 2011)

      Description

      Here's the patch:


      Index: core/src/main/java/org/icefaces/impl/application/DeltaSubmitParametersPropagation.java
      ===================================================================
      --- core/src/main/java/org/icefaces/impl/application/DeltaSubmitParametersPropagation.java (revision 24358)
      +++ core/src/main/java/org/icefaces/impl/application/DeltaSubmitParametersPropagation.java (working copy)
      @@ -51,7 +51,7 @@
       
           public void handleNavigation(FacesContext context, String fromAction, String outcome) {
               NavigationCase navigationCase = getNavigationCase(context, fromAction, outcome);
      - if (navigationCase.isRedirect()) {
      + if ((navigationCase != null) && (navigationCase.isRedirect())) {
                   handler.handleNavigation(context, fromAction, outcome);
               } else {
                   UIViewRoot viewRoot = context.getViewRoot();
      @@ -63,7 +63,13 @@
                       viewAttributes.put(DeltaSubmitPhaseListener.PreviousParameters, idToPreviousParametersMapping);
                   }
                   for (UIForm form: forms) {
      - idToPreviousParametersMapping.put(form.getId(), new HashMap((Map) form.getAttributes().get(DeltaSubmitPhaseListener.PreviousParameters)));
      + Map<String, Object> formAttributes = form.getAttributes();
      + if (formAttributes != null) {
      + Map previousParametersMap = (Map) formAttributes.get(DeltaSubmitPhaseListener.PreviousParameters);
      + if (previousParametersMap != null) {
      + idToPreviousParametersMapping.put(form.getId(), new HashMap(previousParametersMap));
      + }
      + }
                   }
                   handler.handleNavigation(context, fromAction, outcome);
                   //propagate previously calculated submit parameters

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24364 Thu Apr 07 17:24:14 MDT 2011 mircea.toma ICE-6765 Let decorated navigation handler handle missing navigation cases (case==null). Test for the existence of previous parameters in form's attribute map before propagating them to the next view.
        Files Changed
        Commit graph MODIFY /icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/core/src/main/java/org/icefaces/impl/application/DeltaSubmitParametersPropagation.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24363 Thu Apr 07 17:17:06 MDT 2011 mircea.toma ICE-6765 Let decorated navigation handler handle missing navigation cases (case==null). Test for the existence of previous parameters in form's attribute map before propagating them to the next view.
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/application/DeltaSubmitParametersPropagation.java

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Neil Griffin
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: