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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:54:42+00:00 2026-05-29T04:54:42+00:00

Requirement is to render a component outside the form after an ajax call. I

  • 0

Requirement is to render a component outside the form after an ajax call. I have tried with the following code but the text was not being rendered.

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ads="http://java.sun.com/jsf/composite/components">
   <ui:include src="secondfile"/>
   <h:panelGroup id="panel1" rendered="#{bean.access}">
      Some text
    </h:panelGroup>
</ui:composition>

Secondfile:

   <ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ads="http://java.sun.com/jsf/composite/components">
         <f:ajax render="@form _panel1">
    <h:selectOneRadio id="access" value="#{beanTO.access}">
       <f:selectItem itemValue="true" itemLabel="yes"/>
           <f:selectItem itemValue="true" itemLabel="yes"/> 
        </h:selectOneRadio>
        </f:ajax>
    </ui:composition>
  • 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-29T04:54:43+00:00Added an answer on May 29, 2026 at 4:54 am

    I assume that you’ve changed the default naming container separator character from : to _, otherwise you should have used :panel1 instead of _panel1)

    You’re trying to ajax-render a component which is by itself conditionally rendered by the server side. This will not work when the component is not rendered in first place. JS won’t be able to locate the desired HTML element to update after the ajax response arrives. You need to wrap it in another component which is always rendered to the HTML output and set the rendered condition on the wrapped component.

    <h:panelGroup id="panel1">
        <h:panelGroup rendered="#{bean.access}">
            Some text
        </h:panelGroup>
    </h:panelGroup>
    

    See also:

    • Communication in JSF2 – Ajax rendering of content which is by itself conditionally rendered
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project requirement to render HTML and capture the rendered image as
I have the following requirement for creating a user profile in my application: User
I have the following in my controller. My requirement is to populate the second
Requirement is this ... We have our 3 web-applications deployed in RHEL-5 server, we
My requirement is I have server J2EE web application and client J2EE web application.
My requirement is to develop a page with 4 sections, which cannot have a
I have a requirement to grab images from an rss feed and display these
My requirement is to implement auto complete in my text box with my rails
I am using a WebBrowser object to render text which is presented in a
I am working in Asp.net MVC and have a peculiar requirement for which I

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.