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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:54:11+00:00 2026-06-02T22:54:11+00:00

Some days ago I’ve changed mojarra to myfaces to solve this problem , now

  • 0

Some days ago I’ve changed mojarra to myfaces to solve this problem, now I’m having an strange problem rendering my composite components, they simply aren’t rendered the second time I open one popup (the popup is a composite component too).

The first time, as you can see in fieldset, all is rendered ok:
first open

then I click in “CANCELAR” (cancel) button, and the second time, none of my composite components, except the dialog, is rendered:
second open

when I’ve looked at log, I found these messages:

[#|2012-04-10T15:22:00.681-0300|SEVERE|glassfish3.1.1|org.apache.myfaces.renderkit.html.HtmlCompositeComponentRenderer|_ThreadID=19;_ThreadName=Thread-2;|facet UIComponent.COMPOSITE_FACET_NAME not found when rendering composite component prevenda:popupPreVenda:j_id_2uz|#]
[#|2012-04-10T15:22:00.684-0300|SEVERE|glassfish3.1.1|org.apache.myfaces.renderkit.html.HtmlCompositeComponentRenderer|_ThreadID=19;_ThreadName=Thread-2;|facet UIComponent.COMPOSITE_FACET_NAME not found when rendering composite component prevenda:popupPreVenda:inputRazaoSocial|#]
[#|2012-04-10T15:22:00.685-0300|SEVERE|glassfish3.1.1|org.apache.myfaces.renderkit.html.HtmlCompositeComponentRenderer|_ThreadID=19;_ThreadName=Thread-2;|facet UIComponent.COMPOSITE_FACET_NAME not found when rendering composite component prevenda:popupPreVenda:j_id_2vi|#]
[#|2012-04-10T15:22:00.685-0300|SEVERE|glassfish3.1.1|org.apache.myfaces.renderkit.html.HtmlCompositeComponentRenderer|_ThreadID=19;_ThreadName=Thread-2;|facet UIComponent.COMPOSITE_FACET_NAME not found when rendering composite component prevenda:popupPreVenda:j_id_2vn|#]
[#|2012-04-10T15:22:00.686-0300|SEVERE|glassfish3.1.1|org.apache.myfaces.renderkit.html.HtmlCompositeComponentRenderer|_ThreadID=19;_ThreadName=Thread-2;|facet UIComponent.COMPOSITE_FACET_NAME not found when rendering composite component prevenda:popupPreVenda:j_id_2vs|#] 

as you can see, the problem is that myfaces can’t find a facet in composite component…
The only composite component that uses facets is hrgi:popup:

<c:interface>
    <c:attribute name="titulo" default="sem titulo" required="false"/>
    <c:attribute name="renderizar" default="false" required="false"/>
    <c:attribute name="modal" default="true" required="false"/>
    <c:attribute name="bordaConteudo" default="true" required="false"/>
    <c:facet name="cabecalho" required="false"/>
    <c:facet name="conteudo" required="true"/>
    <c:facet name="botoes" required="true"/>
</c:interface>

<c:implementation>
<h:outputStylesheet library="css" name="hrgiPopup.css" target="head"/>
<h:outputStylesheet library="css" name="clearfix.css" target="head"/>
<h:outputScript library="js" name="hrgiPopup.js" target="head"/>
<h:panelGroup layout="block" rendered="#{cc.attrs.renderizar}"
              class="hrgi-dialog-panel clearfix">
    <h:panelGroup layout="block" class="hrgi-dialog-overlay clearfix" rendered="#{cc.attrs.modal}"></h:panelGroup>
    <h:panelGroup id="popup" layout="block" class="hrgi-dialog-box clearfix">
        <h:panelGroup layout="block" class="hrgi-dialog-title clearfix">
            <h:outputText style="float:left" value="#{cc.attrs.titulo}"/>
        </h:panelGroup>
        <h:panelGroup layout="block" class="hrgi-dialog-content clearfix">
            <c:renderFacet name="cabecalho" required="false"/>
            <h:panelGroup layout="block" class="hrgi-dialog-background clearfix"
                          rendered="#{cc.attrs.bordaConteudo}">
                <c:renderFacet name="conteudo" required="true"/>
            </h:panelGroup>
            <h:panelGroup layout="block" class="clearfix" rendered="#{not cc.attrs.bordaConteudo}">
                <c:renderFacet name="conteudo" required="true"/>
            </h:panelGroup>
            <c:renderFacet name="botoes" required="true"/>
            <script type="text/javascript">
                cercarEventoTab("#{cc.clientId}:popup");
            </script>
        </h:panelGroup>
    </h:panelGroup>
</h:panelGroup>
</c:implementation>

Is this a bug of MyFaces?? Mojarra doesn’t show any problem like this!

UPDATED

The problem just happens when user clicks “CANCELAR” button… The action call this code to clear the fields and close the dialog:

public void cancelar(ActionEvent evento){
    fechar();
    UIComponent componente=evento.getComponent().getParent().getParent().getParent();
    componente.getFacet("conteudo").getChildren().clear();
}

this code was adapted from the approaches you can see here. In this case, only components inside facet conteudo are recreated. Works fine, except with the my composite components.

  • 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-02T22:54:12+00:00Added an answer on June 2, 2026 at 10:54 pm

    I don’t know why, but after I’ve created some class to handle exceptions, this problem disappeared…

    public class HRGIExceptionHandler extends ExceptionHandlerWrapper {
    
        private ExceptionHandler wrapped;
    
        public HRGIExceptionHandler(ExceptionHandler wrapped) {
            this.wrapped = wrapped;
        }
    
        @Override
        public ExceptionHandler getWrapped() {
            return wrapped;
        }
    
        @Override
        public void handle() throws FacesException {
            Iterator i = getUnhandledExceptionQueuedEvents().iterator();
            while (i.hasNext()) {
                ExceptionQueuedEvent event = (ExceptionQueuedEvent) i.next();
                ExceptionQueuedEventContext context = (ExceptionQueuedEventContext)event.getSource();
                Throwable t = context.getException();
                try{
                    t.printStackTrace();
                }finally{
                    i.remove();
                }
            }
            getWrapped().handle();
        }
    }
    

    and

    public class HRGIExceptionHandlerFactory extends ExceptionHandlerFactory {
    
        private ExceptionHandlerFactory parent;
    
        public HRGIExceptionHandlerFactory(ExceptionHandlerFactory parent) {
            this.parent = parent;
        }
    
        @Override
        public ExceptionHandler getExceptionHandler() {
            ExceptionHandler result = new HRGIExceptionHandler(parent.getExceptionHandler());
            return result;
        }
    }
    

    finally I’ve added this to faces.config:

    <factory>
        <exception-handler-factory>com.hrgi.web.erp.HRGIExceptionHandlerFactory</exception-handler-factory>
    </factory>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I posted some days ago this question: How to intersect multiple polygons? . Now
i created this ticked some days ago. http://trac.symfony-project.org/ticket/8922#preview I'm interested in creating a patch
I started out with Django some days ago and I have now made a
I've asked the same question some days ago, but there I wanted to solve
Some days ago I asked a question about my problem and I was advised
This post is closely related to another one I posted some days ago .
since some days ago I have a problem with VS2008 in a daily task.
A few days ago I posted some code like this: StreamWriter writer = new
I encountered a problem some days ago while working with Generic TList in the
I've started with objective-c/iphone programming a couple of days ago, and still having some

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.