• Post Reply Bookmark Topic Watch Topic
  • New Topic

h: panelGroup issue  RSS feed

 
Maya Pillai
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to display a button in jsf page based on a condition.

Backing Bean
-----------------


JSF
------


The second button is displaying only whatever (true/false) returned from the backing bean.

Can anyone help me to solve this.
 
Tim Holloway
Bartender
Posts: 18713
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You indicated that the "rendered" attribute should reference a bean named "showButton". What you probably meant was:


However, since that requires a boolean bean property, your actual bean method should be named "isShowButton()".
 
Maya Pillai
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I made the change .....still only the second option is working always....whatever value (true/false) in the isNOKFilled variable.

 
Tim Holloway
Bartender
Posts: 18713
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not how JavaBeans work. To get your view to function as expected, you'd need to add a method named "isIsNOKFilled" to your backing bean.

The "set" and "get/is" part of the accesor method name is automatically added when the EL processor evaluates the expression. You should not supply it yourself.

In JSF, if a property is not found, it is usually treated as being null and is ignored. So if you misspell a property or action name, you won't see any errors, they just won't work right.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!