File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes rendering XHTML components from ajax+Jquery 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 "rendering XHTML components from ajax+Jquery" Watch "rendering XHTML components from ajax+Jquery" New topic

rendering XHTML components from ajax+Jquery

senthil selva

Joined: Mar 18, 2013
Posts: 4
Hi frnds...
i need to update a "div" container with a "xhtml" page, from the page where the "div" container resides...
Below are my codes...




the button click on "updateDiv.xhtml" calls the javascript function "updateDivContent()" and it inturn it calls the "divContent.xhtml" ..No probs with the ajax call..
the problem is with the rendering of "divContent.xhtml" 's "h:inputText" inside "updateDiv" div from "updateDiv.xhtml" , which does not render, it just gives out the "h:inputText" component and not the basic html component like "<input type="text" ..>"

can any one please help me in rendering the XHTML component ....
thanks in advance...
senthil selva

Joined: Mar 18, 2013
Posts: 4
I solved this problem.....
the problem here is with the javascript url


i changed divContent.xhtml into divContent.jsf
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15959

senthil selva wrote:
i changed divContent.xhtml into divContent.jsf

"divContent.xhtml" is a resource name. Resources are not directly visible to clients.

"divContent.jsf" is a URL name. When a client submits a URL request to the server, the server dissects the URL string and routes the request to the appropriate URL handler. Which, in this particular case is the FacesServlet, which in turn examines the URL and hands it off to the Facelets resource resolver, which decodes the URL path into its corresponding resource path(s). So the divContent.xhtml resource is used by JSF to construct the response for a request for the divContent.jsf URL.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: rendering XHTML components from ajax+Jquery
Similar Threads
What does "Content is being hidden from the validator based on namespace filtering" mean?
JSF 2.0 Login
problem with new user
JSF: Jscolor stops working after first postback of fresh deploy