1

(intro: I have generated Entity Clases from DB with one tabe lets say Beans, so it generated me Beans.java, BeansFacade.java, BeansController.java and AbstracFacade.java than I added JSF pages from entity classes, and just want to add something to list.xhtml)

In my BeansFacade.java I have

public String simple(){
        return "output";
    }

In BeansController.java I hava

public String printSimple(){
        return ejbFacade.simple();
    }

And than whem I try to print that

 <h:outputText value="#{beansController.printSimple}"> </h:outputText>

I get an error javax.el.PropertyNotFoundException:

The class 'fct.entity.EventsController' does not have the property 'printSimple'.

Tiny
  • 27,221
  • 105
  • 339
  • 599
1392023093user
  • 1,047
  • 4
  • 21
  • 37

1 Answers1

3

You are not able to call the method in h:outputText. h:outputText tries to search the given variable related getter/setter

private String printSimple;

public String getPrintSimple()
{
    return ejbFacade.simple();;
}

/**
 * @return the simple
 */
public String getSimple()
{
    return simple;
}

And than whem you can use the simple variable to get the value.

<h:outputText value="#{beansController.printSimple}"> </h:outputText>

before that call the printSimple method.

newuser
  • 8,338
  • 2
  • 25
  • 33