Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6561195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:33:26+00:00 2026-05-25T13:33:26+00:00

I have a page Create.xhtml that contains <p:calendar …. /> In another page List.xhtml,

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:33:26+00:00Added an answer on May 25, 2026 at 1:33 pm

    Thanks to Regis Machado that provided the solution i resolved the problem:

    In my template, I just insert the <h:head> content in a div panel:

    <!-- by layout="block" the panelGroup is rendered as a div, omitting as span -->
    <h:panelGroup id="headPanel" layout="block">
       <h:head>
            <!-- Head Content -->
       </h:head>
    </h:panelGroup>
    

    Then in List.xhtml:

    <p:commandLink value="Create" actionListener="#{myBean.toggleInclude}" update=":includePanel,:headPanel"/>
    

    In commandLink update, by putting :includePanel before :headPanel, the <head> tag is refreshed AFTER the page including, to let the browser renderer know what new script to import.

    BTW:
    The second solution provided by Regis Machado works too, but isn’t manageable, first of all because loanding scripts at startup (by inclunding a void calendar and fileupload) drastically reduces the application performance (thing reported in question), if more cases of pages including needed, and second makes code maintenance more complex.

    Many thanks for the help, and hope can hel someone!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have looked on FaceBook Developer page and found that it's possible to create
I'm trying to create a simple portfolio page. I have a list of thumbs
I'm creating a login page. I want to create ASP.NET TextBox controls that have
i have to create one asp.net mvc page that will show template of controls.
My issue is the following. I have a XHTML 1.1 page that has a
I have a page that contains some dynamically created controls (TextBox and DropDownList). When
I have my views render to route requests like /controller/action (for instance, /Page/Create), so
I have a page which basically allows an admin user to create manager user
I have set permission to allow anonymous user to create page. but when the
i have to create an asp.net page dynamically on runtime. It should work like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.