This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Trouble updating view from AJAX  RSS feed

 
Allen Legge
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been searching for several days for a solution that works, but I haven't found anything that resolves my problem thus far. So here it is:

I have two images. I want to be able to click them and kick off a call to a listener in Java to change a value in the bean. I also want the view to update my dropdown (labeled "menuModel") to either be rendered or not, depending on which image I click. Alternatively, I would be fine with the dropdown simply being disabled and enabled for the same criteria.

So far, the listener kicks off fine, and the value gets updated correctly in the bean. However, the view never gets updated. I have tried this a hundred different ways, but nothing seems to work. If I hit refresh on my browser, the view updates. But I want it to do it automatically.

What am I doing wrong?

NOTE: I am using standard JSF 2.1.




 
chets patel
Ranch Hand
Posts: 77
Eclipse IDE Redhat Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you try adding "menuModel" in render attribute of ajax event like below.

 
Allen Legge
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It didn't have an effect on it unfortunately.

I did notice something in the Tomcat window though. I have no idea what this means, but it gets thrown every time I click one of the images:

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!