3 Replies Latest reply on Dec 18, 2008 5:47 PM by geeordanoh

    Help binding bean to the view

    geeordanoh

      Hi, I have a problem with my first bean using Seam.
      I have a bean (with its @Name annotations and a regular interface with @Local. This is a @Stateless bean with EVENT seam scope. It has just one method 'count' that performs a query and return one int.


      On my XHTML page I just have in the body something like



      <f:view>
      <div id="wrapper">
              <div id="page">
                      <div id="content">
                              #{myBeanName.count}
                              
                      </div>
              </div>
              
      </div>
      </f:view>
      




      But I receive the following expection trying to load this page:



      javax.el.ELException: /home.xhtml: Property 'count' not found on type org.javassist.tmp.java.lang.Object_$$_javassist_2
              at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:48)
              at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
              at com.sun.facelets.compiler.UILeaf.encodeAll(UILeaf.java:149)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
              at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)




      Where is my error? I have to declare my beans somewhere? I have a quite empty pages.xml (no navigation rules)...Am I forgetting some config issues? I just have one page and this bean.


      Thank you for your support :-)