ICEfaces
  1. ICEfaces
  2. ICE-1607

PersistentFacesState.render() Ajax Push incompatible with Liferay 4.3.0

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6DR#4
    • Fix Version/s: 1.6DR#5, 1.6
    • Component/s: None
    • Labels:
      None
    • Environment:
      Win XP / Tomcat 5.5.17 / Liferay 4.3 (pre-release)

      Description

      The server-initiated rendering API provided by ICEfaces-1.6-DR5, as outlined here: http://www.icesoft.com/developer_guides/icefaces/htmlguide/devguide/advanced_topics2.html

      And as implemented in the ICEfaces <ice:inputFile/> tutorials:
      http://facestutorials.icefaces.org/tutorial/inputFile-tutorial.html

      Does not work with Liferay 4.3.0 (pre-release).

      The way it manifests itself, is that although the progressListener method is called in the bean, the browser's DOM is not updated with the percent done.

      I'll attach an example portlet shortly.

        Issue Links

          Activity

          Hide
          Neil Griffin added a comment -

          Unzip to the webapps folder, and after Liferay starts, you'll see the portlet under the "Test" category

          Show
          Neil Griffin added a comment - Unzip to the webapps folder, and after Liferay starts, you'll see the portlet under the "Test" category
          Hide
          Deryk Sinotte added a comment -

          Looks like we can improve behaviour by adjust the web.xml configuration to use the "old" servlets and mappings. Since the refactor of 1.6, traffic generally flows through the MainServlet. However, this is not yet officially supported and by switching back to the 1.5 servlets and mappings, the input file seems to work better.

          So change these servlets and mappings:

          <servlet>
          <servlet-name>Main Servlet</servlet-name>
          <servlet-class>com.icesoft.faces.webapp.http.servlet.MainServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
          </servlet>

          <servlet>
          <servlet-name>uploadServlet</servlet-name>
          <servlet-class>com.icesoft.faces.component.inputfile.FileUploadServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
          </servlet>

          <servlet-mapping>
          <servlet-name>Main Servlet</servlet-name>
          <url-pattern>*.iface</url-pattern>
          </servlet-mapping>

          <servlet-mapping>
          <servlet-name>Main Servlet</servlet-name>
          <url-pattern>/xmlhttp/*</url-pattern>
          </servlet-mapping>

          <servlet-mapping>
          <servlet-name>Main Servlet</servlet-name>
          <url-pattern>/block/*</url-pattern>
          </servlet-mapping>

          <servlet-mapping>
          <servlet-name>uploadServlet</servlet-name>
          <url-pattern>/uploadHtml</url-pattern>
          </servlet-mapping>

          back to:

          <servlet>
          <servlet-name>Persistent Faces Servlet</servlet-name>
          <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class>
          <load-on-startup> 1 </load-on-startup>
          </servlet>

          <servlet>
          <servlet-name>Blocking Servlet</servlet-name>
          <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class>
          <load-on-startup> 1 </load-on-startup>
          </servlet>

          <servlet>
          <servlet-name>uploadServlet</servlet-name>
          <servlet-class>com.icesoft.faces.component.inputfile.FileUploadServlet</servlet-class>
          <load-on-startup>1</load-on-startup>
          </servlet>

          <servlet-mapping>
          <servlet-name>Persistent Faces Servlet</servlet-name>
          <url-pattern>*.iface</url-pattern>
          </servlet-mapping>

          <servlet-mapping>
          <servlet-name>Persistent Faces Servlet</servlet-name>
          <url-pattern>/xmlhttp/*</url-pattern>
          </servlet-mapping>

          <servlet-mapping>
          <servlet-name>Blocking Servlet</servlet-name>
          <url-pattern>/block/*</url-pattern>
          </servlet-mapping>

          <servlet-mapping>
          <servlet-name>uploadServlet</servlet-name>
          <url-pattern>/uploadHtml</url-pattern>
          </servlet-mapping>

          There is still some outstanding issues on file upload that we're looking at so it may not be completely functional yet. A JIRA should be opened shortly to deal with this.

          Show
          Deryk Sinotte added a comment - Looks like we can improve behaviour by adjust the web.xml configuration to use the "old" servlets and mappings. Since the refactor of 1.6, traffic generally flows through the MainServlet. However, this is not yet officially supported and by switching back to the 1.5 servlets and mappings, the input file seems to work better. So change these servlets and mappings: <servlet> <servlet-name>Main Servlet</servlet-name> <servlet-class>com.icesoft.faces.webapp.http.servlet.MainServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>uploadServlet</servlet-name> <servlet-class>com.icesoft.faces.component.inputfile.FileUploadServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Main Servlet</servlet-name> <url-pattern>*.iface</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Main Servlet</servlet-name> <url-pattern>/xmlhttp/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Main Servlet</servlet-name> <url-pattern>/block/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>uploadServlet</servlet-name> <url-pattern>/uploadHtml</url-pattern> </servlet-mapping> back to: <servlet> <servlet-name>Persistent Faces Servlet</servlet-name> <servlet-class>com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet</servlet-class> <load-on-startup> 1 </load-on-startup> </servlet> <servlet> <servlet-name>Blocking Servlet</servlet-name> <servlet-class>com.icesoft.faces.webapp.xmlhttp.BlockingServlet</servlet-class> <load-on-startup> 1 </load-on-startup> </servlet> <servlet> <servlet-name>uploadServlet</servlet-name> <servlet-class>com.icesoft.faces.component.inputfile.FileUploadServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Persistent Faces Servlet</servlet-name> <url-pattern>*.iface</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Persistent Faces Servlet</servlet-name> <url-pattern>/xmlhttp/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Blocking Servlet</servlet-name> <url-pattern>/block/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>uploadServlet</servlet-name> <url-pattern>/uploadHtml</url-pattern> </servlet-mapping> There is still some outstanding issues on file upload that we're looking at so it may not be completely functional yet. A JIRA should be opened shortly to deal with this.
          Hide
          Deryk Sinotte added a comment -

          The other thing that I wanted to mention is that we don't recommend the direct use of PersistentFacesState.render. Instead, as shown in the tutorial and component-showcase examples, you should get a reference to a RenderManager (application-scoped) and call requestRender.

          Show
          Deryk Sinotte added a comment - The other thing that I wanted to mention is that we don't recommend the direct use of PersistentFacesState.render. Instead, as shown in the tutorial and component-showcase examples, you should get a reference to a RenderManager (application-scoped) and call requestRender.
          Hide
          Deryk Sinotte added a comment -

          Marking as FIXED.

          My tests show that both Auction Monitor and TimeZone work fine as portlets. The current caveat is that if you have multiple server-push portlets that they be deployed in the same war (so that they can share the same blocking connection).

          Show
          Deryk Sinotte added a comment - Marking as FIXED. My tests show that both Auction Monitor and TimeZone work fine as portlets. The current caveat is that if you have multiple server-push portlets that they be deployed in the same war (so that they can share the same blocking connection).
          Hide
          Neil Griffin added a comment -

          The final sample-jsf-sun-portlet.war that got posted here:
          http://www.liferay.com/web/guest/downloads/samples

          ... makes use of the "labelComplete" instead of the way I was doing it with the attached portlet. I actually like this "labelComplete" way better, so even though the original buggy behavior can be reproduced, I think Deryk did the right thing by closing this one.

          Thanks!

          Neil

          Show
          Neil Griffin added a comment - The final sample-jsf-sun-portlet.war that got posted here: http://www.liferay.com/web/guest/downloads/samples ... makes use of the "labelComplete" instead of the way I was doing it with the attached portlet. I actually like this "labelComplete" way better, so even though the original buggy behavior can be reproduced, I think Deryk did the right thing by closing this one. Thanks! Neil

            People

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

              Dates

              • Created:
                Updated:
                Resolved: