I want to retain data in jsf page on return. For ex.. if I enter a inputText value in page A and shows that value in Page B using outputText, then, after clicking the back button in Page B, i will return to page A but now inputText is null. I want to retain the value in inputText on return. I can only use view Scoped bean . Any solution?
Asked
Active
Viewed 219 times
0
-
The values backed by the model (the managed bean) can only retain, if you use a session scoped (or even broader application scoped - needless to say) managed bean. View scoped beans are destroyed as soon as you navigate to a different URL. Most requirements usually contradict to what you say. – Tiny Jan 06 '15 at 06:35
-
1I have the impression that you're going totally the wrong path with 2 separate pages apparently together representing a single view. Page B doesn't seem to be idempotent at all, moreover, it doesn't seem that it can exist without Page A. I suggest to reconsider the design approach. Perhaps you just need a single view with conditionally rendered (include) content? Or perhaps you just need to use GET params? See also a.o. http://stackoverflow.com/questions/15521451/how-to-make-url-reflect-the-current-page-and-not-the-previous-one/15523045#15523045 – BalusC Jan 06 '15 at 08:04