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 8144873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:29:42+00:00 2026-06-06T13:29:42+00:00

Before I start: I’m running JSF 2.0 MyFaces on Tomcat 6 and I’ve used

  • 0

Before I start: I’m running JSF 2.0 MyFaces on Tomcat 6 and I’ve used some primefaces in this project already.

I’ve got a page with three filtered dropdowns that set a bunch of parameters in my backing bean. These parameters are then used to include a page under the dropdowns. I’m using ui:include to include this page but I’m pretty sure that ui:include only executes once per lifecycle. That means that the page shows up once and does not change when the dropdowns change.

Here is an example of my view

<h:form>
    <!-- dropdowns to build the route to the included page -->
    <h:selectOneMenu>
        <f:selectItems ... />
        <f:ajax 
           event="change" 
           render=":formInclude" 
           execute=":formInclude" 
           listener="#{control.handledd1Change}"/>
    </h:selectOneMenu>
    <h:selectOneMenu>
        <f:selectItems ... />
        <f:ajax 
           event="change" 
           render=":formInclude" 
           execute=":formInclude" 
           listener="#{control.handledd2Change}"/>
    </h:selectOneMenu>
    <h:selectOneMenu>
        <f:selectItems ... />
        <f:ajax 
           event="change" 
           render=":formInclude" 
           execute=":formInclude" 
           listener="#{control.handledd3Change}"/>
    </h:selectOneMenu>
</h:form>
<h:panelGrid id="formInclude">
    <ui:include src="#{control.formName}.xhtml"/>
</h:panelGrid>

So, I was wondering what the most correct way of dynamically including a page in JSF is. Am I correct about the ui:include only executing once? Is there anything else out there that I could use to dynamically include a page?

  • 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-06T13:29:44+00:00Added an answer on June 6, 2026 at 1:29 pm

    As it turns out I was able to get ui:insert to execute after each drop down change. All I had to do was execute and re-render it using ajax. This was the page that I used to help find my way:

    How to include another XHTML in XHTML using JSF 2.0 Facelets?

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

Sidebar

Related Questions

Am using Mediainfo library in my C# project,before start invoking this dll,i just ran
before I start I want to point out that I tagged this question as
Before start work on implementation Model layout, I ask few question on this site:
Before I start: YES, this is a homework from college. Before I get told
Before I start, I know there is this post and it doesn't answer my
Before start let me tell my experience: I am experienced with C#.NET, web services,
I want to get one record before start date and end date DtpFrom means
I usually try to do TDD with not much analysis (no diagrams) before start
I am working on a Media up-loader which uploads images to Server. Before start
(Before I start, yes I have asked a similar question before; unfortunately due to

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.