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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:03:31+00:00 2026-06-11T08:03:31+00:00

I use a composite component in a form, and I want to use an

  • 0

I use a composite component in a form, and I want to use an ajax call to, when the composite component value is changed, the value of the model for a related field to be reset and the corresponding component to be rendered again (empty). But it seems that I can only set the rendering for the component; not for another one; I keep getting an <f:ajax> contains an unknown id 'ticketForm:gfhId'.

I have a compositecomponent loc:Location (simplified)

<!DOCTYPE...
<html...
<h:body>
  <composite:interface>
    <composite:attribute name="visibleFieldValue" required="true" />
    <composite:attribute name="hiddenFieldValue" required="true" />
    <composite:clientBehavior name="changeLocation" event="click" targets="updateButton deleteButton"/>
  </composite:interface>
  <composite:implementation>
    <div id="#{cc.clientId}">
      <h:inputText id="visibleId" value="#{cc.attrs.visibleFieldValue}"
        readonly="true" onfocus="#{rich:component('popUpPnl')}.show('', {top:'100px', left:'250px'});"/>
      <h:inputHidden id="hiddenId" value="#{cc.attrs.hiddenFieldValue}"
        converter="es.caib.gesma.gesman.data.converter.LocationConverter" />
      <a4j:commandButton id="deleteButton"
        image="/resources/images/icons/textfield_delete.png" alt="Borrar"/>
      <h:commandButton id="updateButton" value="Update"/>

      ...
    </composite:implementation>
  </body>
</html>

The component is used inside form ticketForm as follows:

<loc:location id="locationId"
  hiddenFieldValue="#{ticketCtrl.ticket.location}"
  visibleFieldValue="#{ticketCtrl.ticket.locationDescription}">
  <f:ajax event="changeLocation" render="ticketForm:gfhId" execute="@this"
    listener="#{ticketCtrl.locationListener}"/>
</loc:location>

Setting render to @all or @form causes the exception to not be shown, but the gfhId component is not rendered (I think it is applying it only to the composite component).

For comparing, I have setup the desired behavior with an inputText component in the same form:

<h:inputText id="contactId" value="#{ticketCtrl.ticket.contactPerson}">
  <a4j:ajax event="change" render=":ticketForm:gfhId"
    execute="@this" listener="#{ticketCtrl.locationListener}"/>
</h:inputText>

Any ideas? Thanks in advance.

  • 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-11T08:03:33+00:00Added an answer on June 11, 2026 at 8:03 am

    All relative client IDs (i.e. those not starting with :) in execute and render of <f:ajax> are resolved relative to the parent NamingContainer component. The composite component is implicitly a NamingContainer. So it’s basically looking for ticketForm:gfhId inside the context of the <cc:implementation>, but there’s none.

    Use an absolute client ID instead.

    <f:ajax ... render=":ticketForm:gfhId" />
    

    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 JSF 2 composite component that employs some Ajax behavior. I want
use the [] symbol in the name of the form field you are submitting
I'm trying to create a composite component for use in my Seam application, and
How can I use id of DataTable Component (Primefaces 2.2.1) inside Composite Component in
for my develop i want to use the component-pattern because a component is part
I just dont get it: If I want my composite component to insert children,
I'm trying to extend a LinearLayout to use as a composite component. I have
i want to build a composite component already holding some buttons with the possibility
I am learning about composite components with JSF 2.0 and i want my component
I'm trying create a composite component to use across my projects, so, I've created

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.