Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsf page data not changing

 
Christopher Whu
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2984
12
Firefox Browser IntelliJ IDE Java Mac Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ty fro the help btw... This site turned me on to JSF, which has changed my business...
 
Christopher Whu
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic