Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

display collection without getters n setters  RSS feed

 
chintan shah
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can a collection from a backing bean be displayed on a jsf page without writing the getters n setters for the collection in the bean???

and can a jsf display a local variable in a method of a backing bean???
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have work around for that but it is not recommended.

You can name you function getXXX() and in JSF page bind like value="#{beanName.XXX}".

Hope this works.
 
chintan shah
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there any way to access a variable local to a method in the jsf page....if yes then please explain how.
 
Himanshu Gupta
Ranch Hand
Posts: 598
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The same variable you want to access can be returned by using some method.

If you are comfortable with scope concept then you will get the answer by yourself.
[ October 21, 2008: Message edited by: Himanshu Gupta ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!