ICEfaces
  1. ICEfaces
  2. ICE-3703

Restfaces does not work with 1.7.2

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 1.7.2
    • Fix Version/s: 1.8RC1, 1.8
    • Component/s: None
    • Labels:
      None
    • Environment:
      All

      Description

      I now have a small test case that demonstrates the problem.
       
      I have created two versions of your facelets example, one using 1.7.0 DR2 and one using 1.7.1.
       
      I have modified the facelets example project by adding 4 files:
      restfaces-1.2.jar to the lib directory
      RestfacesBean.java
      restfaces.jspx
      restTemplate.jspx
       
      The zip file may be unzipped into the server\default\deploy directory of JBoss 4.2.3.GA
       
      The example mimics my problem exactly. In the 1.7.0 DR2 version navigating to http://localhost:8080/IcefacesRestfacesGood/restfaces.iface causes the backing bean method in RestfacesBean to be run:
       
      ----- code snippet -------------------
      @ViewListener(pattern="/restfaces.iface")
      public String onLoadPhaseManagerPage() {
      String result = null;
      System.err.println("ICE 1.7.0 DR2 Restfaces is processing the page hit.");
      this.setMessage("RESTFACES IS WORKING!");
      return result;
      }
      ----- code snippet end -------------------
       
      The JBoss console output is what you would expect (file JBosssConsoleLogForRestfacesExample.txt attached):
       
      16:33:52,134 ERROR [STDERR] Oct 23, 2008 4:33:52 PM org.restfaces.application.InitBean init
      INFO: RestFaces initialized!
      16:33:52,134 ERROR [STDERR] ICE 1.7.0 DR2 is in the bean constructor.
      16:33:52,134 ERROR [STDERR] ICE 1.7.0 DR2 Restfaces is processing the page hit.
      16:33:52,446 ERROR [STDERR] ICE 1.7.0 DR2 is in the message getter.
      16:34:38,149 WARN [MainSessionBoundServlet] [1] views have accumulated updates
       
      and the page el expressions correctly displays the new value of #{restfacesBean.message}.
       
      However, if I navigate to http://localhost:8080/ICETest1/restfaces.iface the page does not generate any error but the onLoadPhaseManagerPage() function is never called. Here is the log:
       
      16:33:52,134 ERROR [STDERR] Oct 23, 2008 4:33:52 PM org.restfaces.application.InitBean init
      INFO: RestFaces initialized!
       
      I find it interesting that neither the constructor nor the getter method for the restfacesBean is called.
       
      1. JBossConsoleLogForRestfacesExample.txt
        8 kB
        Tyler Johnson
      1. restfacesNotWorking.jpg
        28 kB

        Activity

        Hide
        Mircea Toma added a comment -

        It seems that this issue doesn't need any framework or component side fixes.
        The constructor or the getter method for the restfacesBean is not called because the bean is not declared in ICETest1's faces-config.xml file. Secondly, the '@ViewListener(pattern="/restfaces.iface")' annotation is not respected because sometime after 1.7.0DR2 release ICEfaces was changed to use viewIDs that have their suffix translated to physical locations. More precisely the change was introduced by the fix for ICE-2823.

        So, declaring restfacesBean managed bean in the faces-config.xml and changing the annotation to '@ViewListener(pattern="/restfaces.jspx")' makes ICETest1 work as expected.

        Show
        Mircea Toma added a comment - It seems that this issue doesn't need any framework or component side fixes. The constructor or the getter method for the restfacesBean is not called because the bean is not declared in ICETest1's faces-config.xml file. Secondly, the '@ViewListener(pattern="/restfaces.iface")' annotation is not respected because sometime after 1.7.0DR2 release ICEfaces was changed to use viewIDs that have their suffix translated to physical locations. More precisely the change was introduced by the fix for ICE-2823 . So, declaring restfacesBean managed bean in the faces-config.xml and changing the annotation to '@ViewListener(pattern="/restfaces.jspx")' makes ICETest1 work as expected.

          People

          • Assignee:
            Unassigned
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: