update <head> content of a page

UI Components for JSF
Post Reply
dr.lesh
Posts: 9
Joined: 22 Aug 2011, 10:57

05 Sep 2011, 08:45

I have a page Create.xhtml that contains
<p:calendar .... />

In another page List.xhtml, that NOT CONTAINS ANY <p:calendar/>,

with a Primefaces Ajax command (so WITHOUT ANY page recall/refresh) i call a
<ui:include src="Create.xhtml"/>

(Using the update param in the <p:ajax /> tag).

The included page is displayed, but the <p:calendar/> doesn't work because, the page <head> tag didn't load the Primefaces calendar library.

The only way to make <p:calendar/> work properly is to reload/refresh the entire page, but i need to do ajax request and update only the include, due to performance issues.

Is there any way to do it? Like refresh/update only the head tag?

EDIT:
Create.xhtml content is in <ui:component> tag, and List.xhtml content is in a <ui:composition> tag (uses a template), both pages DON'T HAVE any <html> , <head>/<h:head> or <body>/<h:body> tag. All these tags are in the template, used by List.xhtml

(You can answer also here http://stackoverflow.com/questions/7298 ... -of-a-page)

SECOND EDIT:
SOLUTION FOUNDED! See the Stackoverflow.com link above.
Primefaces 3.3.1, Glassfish 3.1.2.2-5, Mojarra 2.1.6-4

I'm italian, sorry for my non-perfect english.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 39 guests