This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSF and the fly likes Why not refresh jsf page Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Why not refresh jsf page" Watch "Why not refresh jsf page" New topic
Author

Why not refresh jsf page

Minh Phuc
Greenhorn

Joined: Aug 07, 2012
Posts: 9
I create a bean as

And my jsf page:

And my faces-config


I click on command link the random was called but the data on page was not change although i have been edited data on database. Another case, i navigate to other page after that i return but the data is old! Please help me!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 14487
    
    7

Helpful hint: I normally put my persistence code in a separate persistence service javabean that I inject into the backing bean using Spring. It makes things easier to maintain, since I don't have 2 complex products interacting within the same bean.

I think your primary problem is this:


The value attribute of the dataTable tag should not be a method call, it should be a reference to an object that's either a JSF DataModel class or to an array or Collection that JSF can wrap within a DataModel class.

Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Why not refresh jsf page
 
Similar Threads
problem JSF - datatable from DB
Birth Date nightmare - passing variable between beans and java objects
Providing anchor to columns in a datatable
Input row select on data table does not get called
Which Package to Import to Use FacesContext's getRequestMap()?