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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:59:30+00:00 2026-05-31T17:59:30+00:00

I defined a composite component (actually a few) and when I try to re-render

  • 0

I defined a composite component (actually a few) and when I try to re-render a component inserted with I get the error mentioned:

<f:ajax> contains an unknown id ':contentFrm' - cannot locate it in the context of the component j_idt40

If I simply replace:

<et:pageContent formId="contentFrm">

with

<h:form id="contentFrm">
<div>

then everything works fine

Here is the relevant code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:composite="http://java.sun.com/jsf/composite"> 

    <composite:interface>
        <composite:attribute name="styleClass" default="access-box-content alpha omega grid-12" />
        <composite:attribute name="formId" default="#{cc.attrs.id}" />
    </composite:interface>
    <composite:implementation>
        <h:form id="#{cc.attrs.formId}">
            <div class="#{cc.attrs.styleClass}">
                <composite:insertChildren/>
            </div>
        </h:form>
    </composite:implementation>
</html>

This is how I use the composite

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition id="landing" xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:et="http://java.sun.com/jsf/composite/components"
                template="/layout/template.xhtml"
                xmlns:c="http://java.sun.com/jsp/jstl/core">

    <ui:define name="main-content">
        <et:pageTitle title="#{msg.trx_lastTrx}" />
        <et:tabBar formId="currentTrxFrm">    
            <et:tab bean="#{accountTransactionBacking}"
                    prompt="#{msg.trx_currentTrxs}"
                    reRender=":contentFrm"
                    tabId="1"
                    active="true"/>
        </et:tabBar>
        <et:pageContent formId="contentFrm">
                <et:tabContentPanel rendered="#{accountTransactionBacking.selectedTab ==1}">
                    <ui:include src="/app/summary/currentTrxRG.xhtml" rendered="#{accountTransactionBacking.selectedTab ==1}"/>
                </et:tabContentPanel>
        </et:pageContent>
    </ui:define>
</ui:composition>

TIA

Some more tests.. using same component get’s the same result.. for example the following code gives similar error (even replacing render=”accountSummaryLines” with render=”:accountSummaryLines”)..

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition id="landing" xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:et="http://java.sun.com/jsf/composite/components"
                template="/layout/template.xhtml"
                xmlns:c="http://java.sun.com/jsp/jstl/core">

    <ui:define name="main-content">
        <et:pageTitle title="#{msg.ls_lastStatement}" />

        <et:tabBar formId="acctSummTabFrm">
            <et:tab/> 
        </et:tabBar>

            <et:pageContent formId="accountButtonsFrm">

                ....

                <et:div styleClass="accountSummaryLines" divId="lastStatementLines">
                    <ui:repeat var="row" value="#{lastStatementBacking.lines.data}">
                        <h:outputText escape="false" value="#{row}" styleClass="grid-12 lastStatementDetail"/><br></br>
                    </ui:repeat>
                </et:div>
                <et:div styleClass="access-box-footer">
                    <h:commandButton styleClass="left" action="#{lastStatementBacking.lines.prevPage}" value="#{msg.buttonPrevPage}" style="float:left;">
                        <f:ajax render="accountSummaryLines" />
                    </h:commandButton>
                    <h:commandButton styleClass="right" action="#{lastStatementBacking.lines.nextPage}" value="#{msg.buttonNextPage}">
                        <f:ajax render="accountSummaryLines" />
                    </h:commandButton>
                </et:div>
            </et:pageContent>
    </ui:define>
</ui:composition>

The only way I got this particular example working is using render=”@form” like so..

  • 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-31T17:59:31+00:00Added an answer on May 31, 2026 at 5:59 pm

    It cannot be found because the composite component is by itself a NamingContainer. The real valid client ID would be :idOfComposite:contentFrm where idOfComposite is the (auto)generated ID of the composite component itself. If you do a View Source in webbrowser and locate the <form> in question, then you’ll see it.

    You need to give the composite component a fixed ID

    <et:pageContent id="contentFrm">
    

    and use exactly this ID on a plain HTML element which wraps the composite’s content, e.g. <div> or <span>.

    <composite:implementation>
        <div id="#{cc.id}">
            <h:form>
                <div class="#{cc.attrs.styleClass}">
                    <composite:insertChildren/>
                </div>
            </h:form>
        </div>
    </composite:implementation>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a composite component in JSF 2..., inside it I have defined a
We have a composite primary key for the site table defined below. Functionally, this
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
Can one iterate over all the textbox controls defined in a composite widget? As
I'm loving the jsf 2.0 composite component setup. One other thing I love is
I have created a composite component in JSF2. I works great. I would like
I've got a table defined over a composite type: create type footype as (
I have a stored procedure in PostgreSQL that takes a t_document composite type defined
I have TreeView which contains different item types. Item Styles are defined over a

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.