0

Below is my code in xhtml:

<p:row rendered="#{abcBean.xyzmethod}">

In my bean:

public boolean xyzmethod(){
   String def = "ghi";
   if(!def.equal("ghi"){
       return false;
   }
   return true;
 }

My requirement is, I don't want to display this row if xyzmethod returns false. But I am getting error while loading xhtml as : javax.el.PropertyNotFoundException:abcBean does not have the property 'xyzmethod'.

Am I doing anything wrong? Please help!

Kukeltje
  • 12,223
  • 4
  • 24
  • 47
Indu New
  • 1
  • 1
  • 3

1 Answers1

0

It should be #{abcBean.xyzmethod()} (with parens) since it's a method and not a property.

Daniel Haley
  • 51,389
  • 6
  • 69
  • 95