• Post Reply Bookmark Topic Watch Topic
  • New Topic

rendered problem  RSS feed

 
Yasir Qureshi
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to run this but it seems 'com.gred.const.AppConstant._ONLINE' is not resolved, how can I accomplish this? I dont want to use constant value directly.

<hutputText
rendered="#{pc_View.submitMethod == com.gred.const.AppConstant._ONLINE}"value="#{pc_View.submitMethod}"></hutputText>

Thanks,
Yasir
 
Richard Green
Ranch Hand
Posts: 536
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
put this in your backing bean

public boolean getBlah(){
return pc_View.submitMethod == com.gred.const.AppConstant._ONLINE;
}

and change your JSF page to:-

rendered="#{myBackingBean.blah}"
 
Yasir Qureshi
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Dawson,
I got I have moved all the If else logic in the backing bean and using just the rendered property to hide/display components, I read JSF book it says this is the better apporach and says JSTL should not bu used ... for e.g <c:if> or <c:choose> tags may let you hide/display components but this may cause some synchronication issues with the backing bean...

Thanks for Help,
Yasir
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!