*
The moose likes JSF and the fly likes jsf page data not changing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "jsf page data not changing" Watch "jsf page data not changing" New topic
Author

jsf page data not changing

Christopher Whu
Ranch Hand

Joined: Sep 03, 2008
Posts: 80
I have a session scoped bean driving the data in a jsf page... Basically the bean has a bunch of arraylists that act as the filler for h:selectOneMenu

i am using output links and parameters to feed the page bean, the parameters tell the bean how to populate the arraylists

when i click link A it populates the page for product A.
when i click link B i see that the bean is building arraylists for product B yet the page is displaying Product A's data.

Its like the JSF is not even paying attention to the backing bean... I have no errors...

i know i am doing something wrong and there is probably an easy fix... Any ideas?
Greg Charles
Sheriff

Joined: Oct 01, 2001
Posts: 2835
    
  11

How do you send the request for "click link A"? If it's an AJAX request, then your problem may be as simple as needing a reRender attribute to say that you need the dropdown lists to redraw.
Christopher Whu
Ranch Hand

Joined: Sep 03, 2008
Posts: 80
Greg Charles wrote:How do you send the request for "click link A"? If it's an AJAX request, then your problem may be as simple as needing a reRender attribute to say that you need the dropdown lists to redraw.




i am going to fix the values as soon as i get this page proplem fixed
Christopher Whu
Ranch Hand

Joined: Sep 03, 2008
Posts: 80
ty fro the help btw... This site turned me on to JSF, which has changed my business...
Christopher Whu
Ranch Hand

Joined: Sep 03, 2008
Posts: 80
not sure if this is the correct way to fix it but i basically put a call to a method that clears the form at the top of the jsf page and it works...
#{productLineModel.resetModel()}

i cant believe it was that simple....

I am just going to try and build some logic to not reset unless needed next..

Any advice on a more professional way to do this would be greatly appreciated....
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: jsf page data not changing
 
Similar Threads
popup window in JSF
<h:commandLink> is not working in JSF 2.0
Back button issue
How to hide data in jsp using session object?
Updating Backing Bean Properties using commandLink