This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why is table being rendered even though rendered condition evaluates to false?  RSS feed

 
Dave Alvarado
Ranch Hand
Posts: 436
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm using MyFaces 1.1.6 with a Resin 3.0.19 (Java 1.5) web/app server. I have this code on my JSF page ...



When I run this for the first time, "null" is printed out as a result of the first outputText block, but the table gets rendered anyway. Any ideas why? I'm trying to come up with a condition that the dataTable will not be rendered when that particular methods returns null.

Thanks, - Dave
 
Tim Holloway
Bartender
Posts: 18662
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helpful hint: instead of coding equality tests, just make the backing bean return a boolean value.


By the way. A backing bean is NOT a controller. It's the Model. JSF's controllers are mostly out of sight in their tag implementation code.">
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!