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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:46:02+00:00 2026-05-26T21:46:02+00:00

i have a composite component that contains a form with ajax. what i can’t

  • 0

i have a composite component that contains a form with ajax. what i can’t figure out is why it only works for the @form/@all render parameter.

    <cc:interface>
    <cc:attribute name="radioItem"/>
    <cc:attribute name="radioItems" />
    <cc:attribute name="compImage" />
    <cc:attribute name="compSpecification"/>

    </cc:interface>

<!-- IMPLEMENTATION -->
<cc:implementation>
    <h:form> 
        <div id="options">
            <h:selectOneRadio value="#{cc.attrs.radioItem}" >
                <f:selectItems value="#{cc.attrs.radioItems}" />
                <f:ajax render=":details" />
    </h:selectOneRadio>
        </div>

        <div id="details">
            <h:graphicImage value="#{cc.attrs.compImage}"/>
            <h:outputText value="#{cc.attrs.compSpecification}"/>
        </div>      
   </h:form> 
</cc:implementation>

What am i missing?

  • 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-26T21:46:02+00:00Added an answer on May 26, 2026 at 9:46 pm

    This problem is two-fold:

    1. You’re specifying an absolute client ID :details while the element to be re-rendered is inside the same UINamingContainer parent, so JSF won’t be able to locate it in the component tree. You need to specify a relative client ID details.

    2. You have specified the ID on a plain vanilla HTML element instead of a real JSF component, so JSF won’t be able to locate it in the component tree. You need to use a real JSF component. You need to replace <div> by <h:panelGroup layout="block">.

    So, fix it both:

    <h:form> 
        <div id="options">
            <h:selectOneRadio value="#{cc.attrs.radioItem}" >
                <f:selectItems value="#{cc.attrs.radioItems}" />
                <f:ajax render="details" />
            </h:selectOneRadio>
        </div>
    
        <h:panelGroup id="details" layout="block">
            <h:graphicImage value="#{cc.attrs.compImage}"/>
            <h:outputText value="#{cc.attrs.compSpecification}"/>
        </h:panelGroup>      
    </h:form> 
    

    That it works with @form and @all is just because JSF can locate the element to be re-rendered relative to the component on which the ajax action is been invoked, namely the parent UIForm and UIViewRoot component respectively.

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

Sidebar

Related Questions

I have to write a composite component that shows a login form and can
I have a JSF 2 composite component that employs some Ajax behavior. I want
I have a custom composite control that contains a text box, some validators, as
I have an array list that could contain component or composite and each component
I have created a composite component in JSF2. I works great. I would like
A pretty normal case: We have a 'portlet' composite component that has two states:
I'm creating a composite component in JSF 2..., inside it I have defined a
I have composite project which contains: C++ library for Linux/Windows, C++/CLI library based on
I have a composite control which emits HTML that looks like this <span id=myControl>
I have a composite drop down calendar user control that consists of a textbox

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.