ICEfaces
  1. ICEfaces
  2. ICE-3979

Co-existence with JSF 2.0 for ICEfaces 1.8.x

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.2, 1.8.2-EE-GA
    • Fix Version/s: 1.8.2-EE-GA_P01, 1.8.2a
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      GlassFish v3, JSF 2.0.0 PR

      Description

      It is useful for the current builds of ICEfaces to support JSF 2.0 to support experimentation and and investigation.

      Note that the technique for supporting the current JSF 2.0.0 PR release is likely very different from the technique for fully integrating ICEfaces 2.0 with JSF 2.0.

      Two main barriers to integrating ICEfaces 1.8 with JSF 2.0 present themselves:
        1. the FacesContext API has changed and now contains methods that return JSF 2.0 types
        2. the Facelets implementation is now built into JSF 2.0

      1. can be resolved by instantiating the appropriate class at runtime. 2. requires further investigation, but can be dealt with my not using Facelets initially.



        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18189 Mon Jan 19 10:51:46 MST 2009 ted.goddard experimental support for JSF 2.0.0 PR (ICE-3979)
        Files Changed
        Commit graph ADD /icefaces/trunk/icefaces/core/src/org/icefaces
        Commit graph ADD /icefaces/trunk/icefaces/core/src/org/icefaces/x/context/BridgeFacesContext2.java
        Commit graph ADD /icefaces/trunk/icefaces/core/src/org
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/parser/ImplementationUtil.java
        Commit graph ADD /icefaces/trunk/icefaces/core/src/org/icefaces/x/context
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/BridgeFacesContext.java
        Commit graph ADD /icefaces/trunk/icefaces/core/src/org/icefaces/x
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/View.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/build.xml
        Ted Goddard created issue -
        Hide
        Ted Goddard added a comment -

        Disable gen.facelets.file as follows in component/build.xml:

        • <target name="jar.components" depends="gen.facelets.file, test">
          + <target name="jar.components" depends=" test">
        Show
        Ted Goddard added a comment - Disable gen.facelets.file as follows in component/build.xml: <target name="jar.components" depends="gen.facelets.file, test"> + <target name="jar.components" depends=" test">
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18935 Wed May 27 13:17:50 MDT 2009 ted.goddard updated support for JSF 2.0.0 b13 (ICE-3979)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/org/icefaces/x/context/BridgeFacesContext2.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/BridgeExternalContext.java
        Commit graph ADD /icefaces/trunk/icefaces/core/src/org/icefaces/x/context/BridgeExternalContext2.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/build.xml
        Hide
        Ted Goddard added a comment -

        This has been updated to include a wrapper for ExternalContext. This is necessary because of the addition of (among other methods) to the ExternalContext API:

        public Flash getFlash()

        auctionMonitor deploys and renders, but fails with the following exception upon interaction:

        Caused by: java.lang.NullPointerException
        at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:414)
        at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:124)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:103)
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
        at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19)

        The workaround for this is to modify the actions so that they return the actual viewID:

        Index: src/com/icesoft/applications/faces/auctionMonitor/beans/AuctionMonitorItemBean.java
        ===================================================================
        — src/com/icesoft/applications/faces/auctionMonitor/beans/AuctionMonitorItemBean.java (revision 18928)
        +++ src/com/icesoft/applications/faces/auctionMonitor/beans/AuctionMonitorItemBean.java (working copy)
        @@ -74,7 +74,7 @@
        "./images/time_left_hours.gif";
        private static final String TRIANGLE_OPEN = "./images/triangle_open.gif";
        private static final String TRIANGLE_CLOSED = "./images/triangle_close.gif";

        • private static final String SUCCESS = "success";
          + private static final String SUCCESS = "auctionMonitor.iface";

        private static final String STYLE_CLASS_EXPANDED_ROW = "rowClassHilite";

        Index: src/com/icesoft/applications/faces/auctionMonitor/beans/UserBean.java
        ===================================================================
        — src/com/icesoft/applications/faces/auctionMonitor/beans/UserBean.java (revision 18928)
        +++ src/com/icesoft/applications/faces/auctionMonitor/beans/UserBean.java (working copy)
        @@ -351,7 +351,7 @@
        position--;
        }

        • return ("moveUpMinor");
          + return ("auctionMonitor.iface");
          }

        /**
        @@ -365,7 +365,7 @@
        position++;
        }

        • return ("moveDownMinor");
          + return ("auctionMonitor.iface");
          }

        /**
        @@ -378,7 +378,7 @@
        position = (NUM_MESSAGES - 1);
        }

        • return ("moveToTop");
          + return ("auctionMonitor.iface");
          }

        /**
        @@ -389,7 +389,7 @@
        public String moveToBottom()

        { position = bottom(); - return ("moveToBottom"); + return ("auctionMonitor.iface"); }

        /**
        @@ -408,7 +408,7 @@
        position = bottom();
        }

        • return ("switchMinimized");
          + return ("auctionMonitor.iface");
          }

        /**
        Index: src/com/icesoft/applications/faces/auctionMonitor/beans/AuctionBean.java
        ===================================================================
        — src/com/icesoft/applications/faces/auctionMonitor/beans/AuctionBean.java (revision 18928)
        +++ src/com/icesoft/applications/faces/auctionMonitor/beans/AuctionBean.java (working copy)
        @@ -56,7 +56,7 @@
        private static Log log = LogFactory.getLog(AuctionBean.class);
        private static int userCount = 0;
        public static final String RENDERER_NAME = "demand";

        • private static final String SUCCESS = "success";
          + private static final String SUCCESS = "auctionMonitor.iface";
          private String queryItemID;
          private String queryString;
          private AuctionMonitorItemBean[] searchItemBeans;
          Index: web/auctionMonitor.jspx
          ===================================================================
            • web/auctionMonitor.jspx (revision 18928)
              +++ web/auctionMonitor.jspx (working copy)
              @@ -324,7 +324,7 @@
              title="Enter your message text"
              styleClass="textField"/>
              <ice:commandButton id="button_send_message"
        • value="Send Message" action="send"
          + value="Send Message" action="auctionMonitor.iface"
          styleClass="orangeButtons"
          title="Send your message text"/>
          </ice:column>
        Show
        Ted Goddard added a comment - This has been updated to include a wrapper for ExternalContext. This is necessary because of the addition of (among other methods) to the ExternalContext API: public Flash getFlash() auctionMonitor deploys and renders, but fails with the following exception upon interaction: Caused by: java.lang.NullPointerException at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:414) at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:124) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:103) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:19) The workaround for this is to modify the actions so that they return the actual viewID: Index: src/com/icesoft/applications/faces/auctionMonitor/beans/AuctionMonitorItemBean.java =================================================================== — src/com/icesoft/applications/faces/auctionMonitor/beans/AuctionMonitorItemBean.java (revision 18928) +++ src/com/icesoft/applications/faces/auctionMonitor/beans/AuctionMonitorItemBean.java (working copy) @@ -74,7 +74,7 @@ "./images/time_left_hours.gif"; private static final String TRIANGLE_OPEN = "./images/triangle_open.gif"; private static final String TRIANGLE_CLOSED = "./images/triangle_close.gif"; private static final String SUCCESS = "success"; + private static final String SUCCESS = "auctionMonitor.iface"; private static final String STYLE_CLASS_EXPANDED_ROW = "rowClassHilite"; Index: src/com/icesoft/applications/faces/auctionMonitor/beans/UserBean.java =================================================================== — src/com/icesoft/applications/faces/auctionMonitor/beans/UserBean.java (revision 18928) +++ src/com/icesoft/applications/faces/auctionMonitor/beans/UserBean.java (working copy) @@ -351,7 +351,7 @@ position--; } return ("moveUpMinor"); + return ("auctionMonitor.iface"); } /** @@ -365,7 +365,7 @@ position++; } return ("moveDownMinor"); + return ("auctionMonitor.iface"); } /** @@ -378,7 +378,7 @@ position = (NUM_MESSAGES - 1); } return ("moveToTop"); + return ("auctionMonitor.iface"); } /** @@ -389,7 +389,7 @@ public String moveToBottom() { position = bottom(); - return ("moveToBottom"); + return ("auctionMonitor.iface"); } /** @@ -408,7 +408,7 @@ position = bottom(); } return ("switchMinimized"); + return ("auctionMonitor.iface"); } /** Index: src/com/icesoft/applications/faces/auctionMonitor/beans/AuctionBean.java =================================================================== — src/com/icesoft/applications/faces/auctionMonitor/beans/AuctionBean.java (revision 18928) +++ src/com/icesoft/applications/faces/auctionMonitor/beans/AuctionBean.java (working copy) @@ -56,7 +56,7 @@ private static Log log = LogFactory.getLog(AuctionBean.class); private static int userCount = 0; public static final String RENDERER_NAME = "demand"; private static final String SUCCESS = "success"; + private static final String SUCCESS = "auctionMonitor.iface"; private String queryItemID; private String queryString; private AuctionMonitorItemBean[] searchItemBeans; Index: web/auctionMonitor.jspx =================================================================== web/auctionMonitor.jspx (revision 18928) +++ web/auctionMonitor.jspx (working copy) @@ -324,7 +324,7 @@ title="Enter your message text" styleClass="textField"/> <ice:commandButton id="button_send_message" value="Send Message" action="send" + value="Send Message" action="auctionMonitor.iface" styleClass="orangeButtons" title="Send your message text"/> </ice:column>
        Hide
        Pavel Kuzin added a comment -

        Icefaces 1.8.2 don`t want to build with JSF 2.0

        BridgeExternalContext does`t have property getRequestURI();

        jsf2:
        [javac] Compiling 2 source files to /home/kuzmich/Soft/Icefaces/trunk/icefaces/core/build/classes
        [javac] /home/kuzmich/Soft/Icefaces/trunk/icefaces/core/src/org/icefaces/x/context/BridgeExternalContext2.java:387: cannot find symbol
        [javac] symbol : method getRequestURI()
        [javac] location: class com.icesoft.faces.context.BridgeExternalContext
        [javac] return wrapped.getRequestURI();
        [javac] ^
        [javac] Note: Some input files use unchecked or unsafe operations.
        [javac] Note: Recompile with -Xlint:unchecked for details.
        [javac] 1 error
        [javac] Compile failed; see the compiler error output for details.
        [copy] Copying 4 files to /home/kuzmich/Soft/Icefaces/trunk/icefaces/core/build/classes

        Show
        Pavel Kuzin added a comment - Icefaces 1.8.2 don`t want to build with JSF 2.0 BridgeExternalContext does`t have property getRequestURI(); jsf2: [javac] Compiling 2 source files to /home/kuzmich/Soft/Icefaces/trunk/icefaces/core/build/classes [javac] /home/kuzmich/Soft/Icefaces/trunk/icefaces/core/src/org/icefaces/x/context/BridgeExternalContext2.java:387: cannot find symbol [javac] symbol : method getRequestURI() [javac] location: class com.icesoft.faces.context.BridgeExternalContext [javac] return wrapped.getRequestURI(); [javac] ^ [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 1 error [javac] Compile failed; see the compiler error output for details. [copy] Copying 4 files to /home/kuzmich/Soft/Icefaces/trunk/icefaces/core/build/classes
        Hide
        Pavel Kuzin added a comment -

        It seems getRequestURI was removed in revision 19219

        Show
        Pavel Kuzin added a comment - It seems getRequestURI was removed in revision 19219
        Hide
        Ted Goddard added a comment -

        We would recommend that you use ICEfaces 2.0 (the Alpha release is now available) with JSF 2.0. Do you have a project that requires ICEfaces 1.8.x on JSF 2.0, or can you upgrade to ICEfaces 2.0?

        Show
        Ted Goddard added a comment - We would recommend that you use ICEfaces 2.0 (the Alpha release is now available) with JSF 2.0. Do you have a project that requires ICEfaces 1.8.x on JSF 2.0, or can you upgrade to ICEfaces 2.0?
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20357 Mon Jan 25 11:39:00 MST 2010 ted.goddard fall back to JSF 1.2 if JSF 2.0 detection succeeds but JSF 2.0 integration fails (ICE-3979)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/View.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #20421 Fri Jan 29 13:16:27 MST 2010 ted.goddard fall back to JSF 1.2 if JSF 2.0 detection succeeds but JSF 2.0 integration fails (ICE-3979)
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.8.2/icefaces/core/src/com/icesoft/faces/context/View.java
        Ken Fyten made changes -
        Field Original Value New Value
        Summary Experimental compatibility with JSF 2.0 Co-existence with JSF 2.0 for ICEfaces 1.8.x
        Salesforce Case []
        Fix Version/s 1.8.2a [ 10229 ]
        Ken Fyten made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Ted Goddard added a comment -

        For GlassFish v3, use the following web.xml to ensure that JSF 1.2 bundled with the application is used:

        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
        <sun-web-app >
        <class-loader delegate="false"/>
        <property name="useBundledJsf" value="true"/>
        </sun-web-app>

        Show
        Ted Goddard added a comment - For GlassFish v3, use the following web.xml to ensure that JSF 1.2 bundled with the application is used: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd"> <sun-web-app > <class-loader delegate="false"/> <property name="useBundledJsf" value="true"/> </sun-web-app>
        Ken Fyten made changes -
        Salesforce Case []
        Fix Version/s 1.8.2-EE-GA_P01 [ 10220 ]
        Ken Fyten made changes -
        Salesforce Case []
        Affects Version/s 1.8.2-EE-GA [ 10216 ]
        Affects Version/s 1.8.2 [ 10190 ]
        Affects Version/s 1.8DR#2 [ 10142 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #23100 Thu Nov 11 09:37:40 MST 2010 ted.goddard disabled prototype JSF 2.0 integration (ICE-3979)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/parser/ImplementationUtil.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved: