This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes How rerender a JSF component from an included page?! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How rerender a JSF component from an included page?!" Watch "How rerender a JSF component from an included page?!" New topic
Author

How rerender a JSF component from an included page?!

Francisco Neto
Greenhorn

Joined: Mar 29, 2007
Posts: 25
Hi all,

I've developed a new application using JSF and Ajax4JSF. After developed a little pages I realized that there is a search that I could separate in a different component and share this new JSF page with the others. I'm including this page using the <a4j:include> tag. The problem is that when the user finishes the query I want to rerender the page (or maybe a component inside this page) that included it.

Do you guys have any suggestion to me?! What approach could I use?

P.S.: I was thinking about using the DWR library (Reverse Ajax) but I think that's not a good idea because ajax4jsf is already into the project. And I don't know if I could integrate DWR with JSF.

Thanks a lot,
Francisco.
a
Greenhorn

Joined: Jun 11, 2007
Posts: 7
Hi,
give your a4j:include an explicit id (e.g. id="searchInclude"). If the user sumbits his search, use the a4j:commandButton and take the reRender tag (reRender="searchInclude") to reRender your include. For further infos take a look into the a4j developers guide.

Cu
Alex
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How rerender a JSF component from an included page?!
 
Similar Threads
Resetting bean value in JSF
Clearing the form values on value change event of drop down in jsf
Ajax4JSF - Can't generate ajax call from JSF page
How to change attribute of a component?
ajax reRender when inputText value change occurs