4 Replies Latest reply on Oct 30, 2012 11:07 AM by gimbal2

    Can't reference methods in a Bean from a Composite JSF Component.

      I have the following composite component TestCC.xhtml:

      <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html"
      xmlns:cc="http://java.sun.com/jsf/composite" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
      <cc:attribute name="manager" method-signature="java.lang.String helloTest()" required="true"/>
      Hello #{cc.attrs.manager} !!!!!!!!!!!!!!!!!!!!!

      When I try to call it in a JSFF file:

      <?xml version='1.0' encoding='UTF-8'?>
      <ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
      <icc:TestCC manager="#{viewScope.PatientClinicalBean.helloTest}"/>

      The page crashes at my composite tag with the following message in the console:

      javax.el.ELException: //C:/Documents and Settings/tlam/Application Data/JDeveloper/system11. javax.el.PropertyNotFoundException: //C:/Documents and Settings/tlam/Application Data/JDeveloper/system11. @13,86 manager="#{viewScope.PatientClinicalBean.helloTest}": The class 'patient.profile.PatientClinicalBean' does not have the property 'helloTest'.

      But my managed bean does have a public String helloTest() method, as well as other methods that work fine elsewhere in my JSFF page:
      public class PatientClinicalBean{
      String test = "TESTING";
      public String helloTest() {
      return test;
      I have tried this many times with different methods, all with the same result. Yet if my composite component outputs just a string and I enter the expression <icc:TestCC manager="#{viewScope.PatientClinicalBean.test}"/> to access the String test field directly it executes properly. I can't seem to reference any of the methods in PatientClinicalBean from only my composite component, when other method calls work fine in the same JSFF page. All other examples I've seen on the web have no problems doing this the same way I have, am I missing something?!

      Edited by: tnology on 24-Oct-2012 14:13

      Edited by: tnology on 24-Oct-2012 14:14

      Edited by: tnology on 24-Oct-2012 14:16