ICEfaces
  1. ICEfaces
  2. ICE-6855

DeltaSubmitPhaseListener is too specific in casting a PortletRequest to an ActionRequest

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1, EE-2.0.0.GA
    • Fix Version/s: 2.1-Beta, 3.0, EE-2.0.0.GA_P01
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 2 Portlet Portal
    • Assignee Priority:
      P3

      Description

      In testing the latest component-showcase-portlets example in the icefaces2/trunk, I ran into a problem with delta submit. It looks like a recent change that delta submit has been enabled by default for the component-showcase example.

          <context-param>
              <param-name>org.icefaces.deltaSubmit</param-name>
              <param-value>true</param-value>
          </context-param>

      When running the example on WebSphere Portal 7 with the latest PortletFaces bridge and the ICEfaces EE extensions, I ran into the following:

      java.lang.ClassCastException: com.ibm.ws.portletcontainer.core.impl.ResourceRequestImpl incompatible with javax.portlet.ActionRequest
      at org.icefaces.impl.event.DeltaSubmitPhaseListener.reconstructParametersFromDeltaSubmit(DeltaSubmitPhaseListener.java:157)
      at org.icefaces.impl.event.DeltaSubmitPhaseListener.beforePhase(DeltaSubmitPhaseListener.java:58)
      at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:513)
      at org.portletfaces.bridge.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:131
      ...

      The code in the phase listener is casting to an ActionRequest which, for some requests, is too specific. While the request could be an ActionRequest, it's more likely to be a ResourceRequest as that is how Ajax requests are treated.

        Activity

        Hide
        Deryk Sinotte added a comment -

        Patched the trunk so that the DeltaSubmitPhaseListener wraps and casts the incoming requests as more generic PortletRequests rather than the more specific ActionRequests. Most Ajax related communication is done via ResourceRequests.

        Show
        Deryk Sinotte added a comment - Patched the trunk so that the DeltaSubmitPhaseListener wraps and casts the incoming requests as more generic PortletRequests rather than the more specific ActionRequests. Most Ajax related communication is done via ResourceRequests.
        Hide
        Deryk Sinotte added a comment -

        This issue was corrected awhile ago. Marking as resolved.

        Show
        Deryk Sinotte added a comment - This issue was corrected awhile ago. Marking as resolved.

          People

          • Assignee:
            Deryk Sinotte
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: