Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSF if tag

 
N Naresh
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i want to call java method inside jsf file using if tag could any one help in this
 
N Naresh
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am using
if tag like this in jsf file

<if com.pipeline.content.ContentGenerator.SupportsProperty property="section_image">

And ContentGenerator class has SupportsProperty method which accepts argument property is there anything wrong above if tag syntax?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18276
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first thing that's wrong is that JSF has no "if" tag. In fact, JSF's tags are display-oriented. Logic is supposed to go in the backing beans, not on the View.

Some people try to put logic in the View anyway by mixing JSF and JSTL. This often causes them problems.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic