Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to isolate Ajax rendered area for ui:include loaded view in richfaces 4.x

 
Shayan Shah
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi All,

I want to develop a web app that contains an "Menu Area" and "Active Area". That "Active Area" points to a page in the "Controller" managed bean and loads it by ajax request. The page to be loaded is set by ajax request through "A4j:Commandlink" and renders the "Active Area'. Here is the code

1. Index.xhtml


2. Menu.xhtml


3. Include1.xhtml


4. Controller.java


Now, when a page is loaded to active area that as you see contains a "a4j:commandButton" with an actionListener, if the button is clicked, instead of calling the listener method, the page is loaded again, and the when the second time the button is clicked, the page is loaded as well as the listener method is called. Which means that whole page is refreshed again and view is then set and method is called. In richfaces 3.3.x, I used to use "a4j:include" for the active area. Everything worked fine. Now in richfaces 4.x, I have to use ui:include component. 3.3.x had “a4j:region” component to isolate a region. But in 4.x its bahavious has been changed.

Now I dont know how to isolate this region to be re-rendered and the Ajax request. I want only the active are to be changed instead of the whole page to be refreshed.

Thanks
 
Shayan Shah
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I wonder if my question is really vague Or is it that no one knows the solution???
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic