ICEfaces
  1. ICEfaces
  2. ICE-6371

ClassCastException when using fileEntry in Portlets

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta2
    • Fix Version/s: 2.0.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ICEfaces 2.0 , Liferay

      Description

      The real problem is a dependency on a Servlet request:

      ] java.lang.ClassCastException: com.liferay.portlet.RenderRequestImpl cannot be cast to javax.servlet.http.HttpServletRequest
          at org.icefaces.component.fileentry.PushUtils.createPushId(PushUtils.java:155)
          at org.icefaces.component.fileentry.PushUtils.getPushId(PushUtils.java:114)
          at org.icefaces.component.fileentry.FormScriptWriter.encodeBegin(FormScriptWriter.java:88)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1646)

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23492 Mon Dec 13 10:56:39 MST 2010 ted.goddard using ProxyHttpServletRequest/Response (ICE-6371)
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/PushUtils.java
        Ted Goddard created issue -
        Ken Fyten made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 2.0.0 [ 10230 ]
        Hide
        Ken Fyten added a comment -

        Please retest with Liferay portal.

        Show
        Ken Fyten added a comment - Please retest with Liferay portal.
        Ken Fyten made changes -
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Hide
        Ted Goddard added a comment -

        Deryk has found a portlet implementation of commons fileupload, but it requires an action request:

        http://commons.apache.org/fileupload/apidocs/org/apache/commons/fileupload/portlet/package-summary.html

        Initial investigation will make use of core/src/main/java/org/icefaces/impl/push/servlet/ProxyHttpServletRequest.java passed to commons fileupload.

        Show
        Ted Goddard added a comment - Deryk has found a portlet implementation of commons fileupload, but it requires an action request: http://commons.apache.org/fileupload/apidocs/org/apache/commons/fileupload/portlet/package-summary.html Initial investigation will make use of core/src/main/java/org/icefaces/impl/push/servlet/ProxyHttpServletRequest.java passed to commons fileupload.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23497 Mon Dec 13 15:00:41 MST 2010 deryk.sinotte ICE-6371: use proxied requests to provide support for APIs that are required for file download processing in portlets
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ProxyHttpServletRequest.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/FileEntryPhaseListener.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23498 Mon Dec 13 15:13:38 MST 2010 deryk.sinotte ICE-6371: remove System.out calls
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/FileEntryPhaseListener.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23508 Tue Dec 14 15:06:10 MST 2010 deryk.sinotte ICE-6371: implement additional methods in proxy to support file entry component in portlets
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/core/src/main/java/org/icefaces/impl/push/servlet/ProxyHttpServletRequest.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23534 Wed Dec 15 11:19:53 MST 2010 deryk.sinotte ICE-6371: more logic to support portlets
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/FileEntryPhaseListener.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23535 Wed Dec 15 11:20:58 MST 2010 deryk.sinotte ICE-6371: have the fileentry form submit using the resource encodedURL rather than the default action URL
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/resources/org.icefaces.component.fileentry/fileEntry.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23575 Thu Dec 16 11:12:35 MST 2010 deryk.sinotte ICE-6371: remove portlet dependencies from phase listener
        Files Changed
        Commit graph ADD /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/FileUploadPortletRequestWrapper.java
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/FileEntryPhaseListener.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23580 Thu Dec 16 14:34:39 MST 2010 deryk.sinotte ICE-6371: add the showcase_style.css file as a resource to b loaded to improve portlet styling
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/samples/ace/showcase/src/portlets/webapp/view.xhtml
        Commit graph ADD /icefaces2/trunk/icefaces/samples/ace/showcase/src/main/webapp/resources
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23581 Thu Dec 16 14:35:16 MST 2010 deryk.sinotte ICE-6371: add the showcase_style.css file as a resource to b loaded to improve portlet styling
        Files Changed
        Commit graph ADD /icefaces2/trunk/icefaces/samples/ace/showcase/src/main/webapp/resources/ace.showcase
        Commit graph ADD /icefaces2/trunk/icefaces/samples/ace/showcase/src/main/webapp/resources/ace.showcase/showcase_portlet_style.css
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23589 Thu Dec 16 15:34:50 MST 2010 deryk.sinotte ICE-6371: set the image as a resource expression in the stylesheet
        Files Changed
        Commit graph ADD /icefaces2/trunk/icefaces/samples/ace/showcase/src/main/webapp/resources/ace.showcase/icon_info.gif
        Commit graph MODIFY /icefaces2/trunk/icefaces/samples/ace/showcase/src/main/webapp/resources/ace.showcase/showcase_portlet_style.css
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23600 Thu Dec 16 17:16:44 MST 2010 deryk.sinotte ICE-6371: comment out all portlets except for fileEntry, rename for consistency, and add separate web.xml for portlet build
        Files Changed
        Commit graph ADD /icefaces2/trunk/icefaces/samples/ace/showcase/src/portlets/webapp/WEB-INF/web.xml
        Commit graph MODIFY /icefaces2/trunk/icefaces/samples/ace/showcase/src/portlets/webapp/WEB-INF/portlet.xml
        Commit graph MODIFY /icefaces2/trunk/icefaces/samples/ace/showcase/src/portlets/webapp/WEB-INF/liferay-display.xml
        Commit graph MODIFY /icefaces2/trunk/icefaces/samples/ace/showcase/src/portlets/webapp/WEB-INF/liferay-portlet.xml
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23606 Thu Dec 16 18:30:36 MST 2010 deryk.sinotte ICE-6371: reflectively get Portlet related class to ensure no runtime dependency in non-portlet environments
        Files Changed
        Commit graph MODIFY /icefaces2/trunk/icefaces/ace/component/src/org/icefaces/component/fileentry/FileEntryPhaseListener.java
        Hide
        Deryk Sinotte added a comment -

        A number of changes have been made to the code in the fileEntry component to make it portlet friendly.

        Show
        Deryk Sinotte added a comment - A number of changes have been made to the code in the fileEntry component to make it portlet friendly.
        Deryk Sinotte made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: