aspose file tools
The moose likes JSF and the fly likes display collection without getters n setters Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "display collection without getters n setters" Watch "display collection without getters n setters" New topic
Author

display collection without getters n setters

chintan shah
Greenhorn

Joined: Oct 05, 2008
Posts: 7
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

Joined: Aug 18, 2008
Posts: 598

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.


My Blog SCJP 5 SCWCD 5
chintan shah
Greenhorn

Joined: Oct 05, 2008
Posts: 7
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

Joined: Aug 18, 2008
Posts: 598

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 ]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: display collection without getters n setters
 
Similar Threads
disabling and rendering components using private boolean - more elegant solution?
Display Different Sections while selecting different radio buttons
What is a bean?
Adding JSF components and binding them at Runtime
when is the backing bean instantiated