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

  • Home
  • SEARCH
  • 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 8918923
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:52:27+00:00 2026-06-15T05:52:27+00:00

I am using JSF2 facelets. I am trying to insert a piece of code

  • 0

I am using JSF2 facelets.

I am trying to insert a piece of code from one page into the other using <ui:composition> and <ui:insert> tags.

I have page A, which includes code from page B.

<h:form id="formIdPageA">
…

<h:form id="formIdPageB">

The problem seems to be form id, since I get error:

System error: Cannot find component with identifier ":formIdPageA:fileListId" in view.

Here is a piece of code from page B that gets inserted into page A. Here ids can be seen:

                    <tr>
                        <td colspan="2">
                            <p:selectOneMenu id="locationId" value = "#{PFMultiFileSelectMgmtBean.selectedLocationId}">
                                <p:ajax update=":formIdPageA:fileListId" listener="#{PFMultiFileSelectMgmtBean.LocationChangeEvent}"/>
                                <f:selectItems value="#{PFJobMgmtBean.outputLocationList}"/>                                
                            </p:selectOneMenu>
                        </td>
                        <td>                                
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <p:selectManyCheckbox id="fileListId" value="PFMultiFileSelectMgmtBean.selectedFiles"  layout="pageDirection">  
                                <f:selectItems value="#{PFMultiFileSelectMgmtBean.fileNames}" />  
                            </p:selectManyCheckbox>  
                        </td>
                    </tr>   

And this is how I insert it in page A:

<p:dialog id="basicDialog" header="Select Files" widgetVar="dlgMultiFileSelect" modal="true" height="500" width="500" resizable="false">
    <ui:insert>  
        <ui:include src="/pageB.xhtml"/>
    </ui:insert>  
</p:dialog>

Does anyone know if it is possible to include page like this? Does <ui:composition> go before body tab or after in page B? Is this ok:

<body>
    <f:view>    
        <h:form id="formIdPageB">
                <ui:composition>...

?

Ok, found it:

The problem was that I used PrimeFaces component <p:dialog> and placed it in page A outside <h:form> and outside <body>, like this:

   </h:form>
 </f:view>      
</body>
<p:dialog...>        
   <ui:include src="/pageB.xhtml"/>       
</p:dialog>

That seems to be wrong. Now I moved <p:dialog> inside form and all is ok.

  • 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-06-15T05:52:29+00:00Added an answer on June 15, 2026 at 5:52 am

    The problem was that I used PrimeFaces component and placed it in page A outside and outside , like this:

        </h:form>
      </f:view>      
    </body>
    <p:dialog...>        
       <ui:include src="/pageB.xhtml"/>       
    </p:dialog>
    

    That seems to be wrong. Now I moved inside the form and all is ok.

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

Sidebar

Related Questions

I am using JSF2 on Facelets. I define an <ui:param> in a page: <ui:composition
I am using JSF2.0 and facelets. How to perform sorting, filtering and page navigation
I'm developing an application using jsf2 and facelets . In one of my views
I have a web app. I am using JSF2 framework. My problem started when
This code, a test case for a custom component using JSF2 Just for the
i'm using jsf 2.1, prettyfaces 3.3.3 and hibernate jpa 3.6.7. i have country page
I have developed a java web application using JSF 2.0(Facelets) on GlassFish 3.1.1 with
We are using JSF2.0 ,our end HTML needs to have <li> in the list
I a working on a JSF2/Spring3/JPA2 project using facelets as view technology. javax.faces.DEFAULT_SUFFIX is
I'm using JSF2.0 and am building up a wizard. I have encountered a problem

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.