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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:39:05+00:00 2026-05-25T21:39:05+00:00

I’m using jQuery’s .load function to load one JSF page into another. This works

  • 0

I’m using jQuery’s .load function to load one JSF page into another.

This works really well until the loaded JSF page uses some AJAX functionality. When this happens, the parent JSF page’s AJAX stops working. In fact, after the two pages are combined whichever page has its AJAX called next is the one that continues to work. The other page stops working. If I use the parent page first, the child breaks. If I use the child first, the parent breaks.

Am I doing something wrong? I’m guessing JSF isn’t designed for this sort of behaviour and that’s fine but then how do I go about doing what I want?

Basically, we have a report page. When the user clicks the link to a report we would like the report to load dynamically into the existing page. That way, the user doesn’t experience a page refresh. It’s a pretty slick behaviour BUT obviously isn’t ideal due to the pages breaking.

I suppose I could do this with a page that contains every report in an outputpanel and then determine which one is rendered based on a value in the backing bean but I can see lots of occasions where I’d like to be able to “inject” one page into another (for dynamic dialogs for instance) and it would suck to have to keep everything in one giant template.

Has anyone else come across this sort of problem? How did you solve it?

  • 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-25T21:39:06+00:00Added an answer on May 25, 2026 at 9:39 pm

    Do not use jQuery.load(). It does not take JSF view state into account at all, so all forms will fail to work. Rather make use of <f:ajax> and rendered attribute instead. Here’s a basic example:

    <h:form id="list">
        <h:dataTable value="#{bean.reports}" var="report">
            <h:column>#{report.name}</h:column>
            <h:column>
                <h:commandLink value="Edit" action="#{bean.edit(report)}">
                    <f:ajax render=":edit" />
                </h:commandLink>
            </h:column>
        </h:dataTable>
    </h:form>
    
    <h:form id="edit">
        <h:panelGrid columns="3" rendered="#{not empty bean.report}">
            <h:outputLabel for="name" value="Name" />
            <h:inputText id="name" value="#{bean.report.name}" required="true" />
            <h:message for="name" />
    
            ...
    
            <h:panelGroup />
            <h:commandButton value="save" action="#{bean.save}" />
            <h:messages globalOnly="true" layout="table" />
        </h:panelGrid>
    </h:form>
    

    You can if necessary split off the content into an <ui:include>.

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

Sidebar

Related Questions

I'm making a simple page using Google Maps API 3. My first. One marker
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from

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.