ICEfaces
  1. ICEfaces
  2. ICE-7931

ACE:FileEntry Component not functioning on Glassfish 3.1.2

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0.1, EE-3.0.0.GA
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      Confirmed using:
      ICEfaces3 Maintenance revision# 28410
      Browser: Firefox11
      Server: Glassfish3.1.2

      Description

      Please see the forum post. When trying to upload a file in the showcase demos there is a message displayed: "The file is required to submit this form. " This message is displayed even though a file is selected.

      This can be tested using either showcase sample or the QA test-suite:
      Showcase: http://server.ice:8888/svn/ossrepo/icefaces3/branches/icefaces-3.0.x-maintenance/icefaces/samples/showcase/showcase
      Test Suite: http://server.ice:8888/svn/repo/qa/trunk/Regression-Icefaces2/Sparkle/Nightly/fileEntry

        Issue Links

          Activity

          Hide
          Ted Goddard added a comment -

          Multipart POST decoding via commons-fileupload is now being done in FileEntryResourceHandler.isResourceRequest(). This is an abuse of the isResourceRequest() method, but allows the InputStream to be decoded.

          There is still redundant code in both FileEntryResourceHandler and FileEntryPhaseListener, so both of these classes are badly in need of some refactoring to remove dead and redundant code.

          Show
          Ted Goddard added a comment - Multipart POST decoding via commons-fileupload is now being done in FileEntryResourceHandler.isResourceRequest(). This is an abuse of the isResourceRequest() method, but allows the InputStream to be decoded. There is still redundant code in both FileEntryResourceHandler and FileEntryPhaseListener, so both of these classes are badly in need of some refactoring to remove dead and redundant code.
          Hide
          Mark Collette added a comment -

          IsResourceRequest() does look like a good hook to handle the multi-part stream, without any side effects of the lifecycle interfering, since it is before the lifecycle:

          Although this does seem like a nice hook for running as soon as possible, since it comes before Lifecycle.execute even happens:

          FacesServlet.service {
          // Acquire the FacesContext instance for this request
          FacesContext context = facesContextFactory.getFacesContext
          (servletConfig.getServletContext(), request, response, lifecycle);

          // Execute the request processing lifecycle for this request
          try {
          ResourceHandler handler =
          context.getApplication().getResourceHandler();
          if (handler.isResourceRequest(context))

          { handler.handleResourceRequest(context); }

          else

          { lifecycle.execute(context); lifecycle.render(context); }

          But in case there is a problem that we're processing things outside/before the lifecycle, there might be a more surgical alteration we could try. If we change AutoUpdateCallbackPartialViewContext and RequestContext so that the DefaultRequestContext instance is lazily set, instead of in AutoUpdateCallbackPartialViewContext's constructor, so that AutoUpdateCallbackPartialViewContext.isAjaxRequest() is not called until later, then maybe that will solve this issue. All the methods in these classes seem to only be needed in ApplyRequestValuesPhase and after. And FileEntryPhaseListener is a little touchy in needing some of this stuff to not be invoked yet in RestoreViewPhase.

          Show
          Mark Collette added a comment - IsResourceRequest() does look like a good hook to handle the multi-part stream, without any side effects of the lifecycle interfering, since it is before the lifecycle: Although this does seem like a nice hook for running as soon as possible, since it comes before Lifecycle.execute even happens: FacesServlet.service { // Acquire the FacesContext instance for this request FacesContext context = facesContextFactory.getFacesContext (servletConfig.getServletContext(), request, response, lifecycle); // Execute the request processing lifecycle for this request try { ResourceHandler handler = context.getApplication().getResourceHandler(); if (handler.isResourceRequest(context)) { handler.handleResourceRequest(context); } else { lifecycle.execute(context); lifecycle.render(context); } But in case there is a problem that we're processing things outside/before the lifecycle, there might be a more surgical alteration we could try. If we change AutoUpdateCallbackPartialViewContext and RequestContext so that the DefaultRequestContext instance is lazily set, instead of in AutoUpdateCallbackPartialViewContext's constructor, so that AutoUpdateCallbackPartialViewContext.isAjaxRequest() is not called until later, then maybe that will solve this issue. All the methods in these classes seem to only be needed in ApplyRequestValuesPhase and after. And FileEntryPhaseListener is a little touchy in needing some of this stuff to not be invoked yet in RestoreViewPhase.

            People

            • Assignee:
              Ted Goddard
              Reporter:
              Cruz Miraback
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: