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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T09:18:18+00:00 2026-06-15T09:18:18+00:00

Here is my composite component: <composite:interface> <composite:attribute name=attr1 /> <composite:clientBehavior name=xyz event=valueChange targets=chkbox />

  • 0

Here is my composite component:

<composite:interface>
    <composite:attribute name="attr1" />
    <composite:clientBehavior name="xyz" event="valueChange" targets="chkbox" />
</composite:interface>
<composite:implementation>
    <h:panelGrid>
    <h:panelGroup>
        <h:selectBooleanCheckbox id="chkbox"
                value="#{cc.attrs.attr1}">
            </h:selectBooleanCheckbox>
    </h:panelGroup>
</h:panelGrid>
</composite:implementation>

And my page:

<h:form id="myForm">
  <cc:myComp attr1="#{myBean.someAttr}">
    <f:ajax render="myform:grid1" event="xyz" listener="{myBean.listenerMethod}"/>
  </cc:myComp>

  <h:panelGrid id="grid1">
      <h:panelGroup>
         <h:inputTextarea id="rationale" rows="4" cols="70"
                value="#{myBean.rationale}" />
      </h:panelGroup>
  </h:panelGrid>
</h:form>

I’m getting below error:

<f:ajax> contains an unknown id ‘myForm:grid1’ – cannot locate it in the context of the component chkbox

If I remove render="myform:grid1" from my code then ajax call is working fine. Basically from my composite component I’m not able to refer another OUTSIDE component. How is this caused and how can I 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-06-15T09:18:19+00:00Added an answer on June 15, 2026 at 9:18 am
    <f:ajax render="myform:grid1">
    

    Any client ID which does not start with the NamingContainer separator character, which is in your case :, is relative to the closest NamingContainer parent. The closest NamingContainer parent is in your particular case the composite component itself. So, this construct is basically looking for a component with the full client ID myform:XXX:myform:grid1 relative to the composite component, where XXX is the autogenerated ID of the composite component. However, there’s no such component with this full client ID.

    Assuming that the full client ID of the panel grid is indeed myform:grid1 (i.e. when you open the page in browser, rightclick and View Source, you’re indeed seeing <table id="myform:grid1">), then you should make it an absolute client ID instead by prefixing it with the NamingContainer separator character:

    <f:ajax render=":myform:grid1">
    

    See also:

    • How to find out client ID of component for ajax update/render? Cannot find component with expression "foo" referenced from "bar"
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a composite component: <composite:interface> <composite:attribute name=actionMethod method-signature=java.lang.String action() required=true /> </composite:interface> <composite:implementation>
I have a composite component: <cc:interface componentType=com.example.MyComponent> <!-- ... --> </cc:interface> <cc:implementation> <f:phaseListener binding=#{cc}/>
For my composite component which is packaged in JAR I've used a <cc:interface> with
According to the JSF documentation for <composite:interface> : Nesting of composite components The implementation
Here is the deal, in my Java project I have to make a composite
The question of composite keys in web2py was answered pretty well by Anthony here
I have a simple composite component with an optional ajax listener implemented with the
I'm using Glassfish 3.2.2 and JSF 2.1.11 I'm trying to create a composite component
I have a simple JSF 2.0 composite component example. <!DOCTYPE html PUBLIC -//W3C//DTD XHTML
How can I use id of DataTable Component (Primefaces 2.2.1) inside Composite Component in

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.