1 Reply Latest reply on Jul 22, 2012 3:29 PM by ctomc

    ui:include ui:param passing EL #{myController} PropertyNotFoundException

    kopzinski

      I can't use any method of my class when I pass her by one xhtml to other using <ui:include... <ui:param>, but I can show the value of any attribute (using respectives get and set).

       

      I'm will be crazy soon...

       

      situation:

       

      first.xhtml

       

      ...<ui:include src="../forms/address.xhtml">

           <ui:param name="controllerTest" value="#{myNormalController}" />

      </ui:include>...

       

      address.xhtml

       

      ...<h:form>

           <p:commandLink value="#{controllerTest.info}" actionListener="#{controllerTest.simpleMethodToTest}" />

      </h:form>...

       

      in MyNormalController.java


      @ConversationScoped

      @Named("myNormalController")

      public class MyNormalController extends AbstractModelController<MyModel> {

       

                private String info = "test";

       

                public void simpleMethodToTest(){

                          System.out.println("Kop! passing in simpleMethodToTest()");

                }

       

                public String getInfo() {

                          System.out.println("Kop! passing in getInfo()");

               return info;

                }...


       

       

      at console:

      when the is loaded:

        html generated (is perfect):

          <a id="j_idt870:j_idt871" href="#" class="ui-commandlink" onclick="PrimeFaces.ab({source:'j_idt870:j_idt871'});return false;">teste</a>

       

      15:24:41,303 INFO  [stdout] (http-localhost-127.0.0.1-8080-4) Kop! passing in getInfo()

       

      Link is ok, so jsf found my java, and called with success the method getInfo()

       

      BUT... when I clicked at link:

       

      15:25:42,554 SEVERE [javax.faces.event] (http-localhost-127.0.0.1-8080-4) Received 'javax.el.PropertyNotFoundException' when invoking action listener '#{controllerTest.simpleMethodToTest}' for component 'j_idt871'

      15:25:42,556 SEVERE [javax.faces.event] (http-localhost-127.0.0.1-8080-4) javax.el.PropertyNotFoundException: Target Unreachable, identifier 'controllerTest' resolved to null

       

      Can anybody help me?