Volker Weber wrote:
you should set ids on your created components, otherwise you will run
into dublicateId exceptions sooner or later. Apart from this your code
looks ok for me.

As long as your component returns false for getRendersChildren() you
don't need to do it yourselve, this is done in the default
implementation of encodeEnd().

Can you explain the problems?

Thanks for the reply Volker.

My current problems are related to container components. When I remove
container components odd things happen. Removing component a results
in the entire component subtree not being rendered. If I remove
container b I fail to get any response for the HTTP request, and if I
remove both I get an error about MyFaces not being able to add a child
node (see below).

Here's what the component tree looks like:

h:panelGrid             # a) custom components not rendered if removed
-- my:inputSelectSet
---- HtmlPanelGrid      # b) no response if removed

------ HtmlPanelGroup # this subhierarchy can repeat 1-n times
-------- HtmlOutputLabel
-------- MyInputSelect
---------- UIInput
---------- HtmlSelectManyListBox

---- ...


Here's the exception I'm getting:

javax.faces.FacesException: cannot add component with id '_idJsp3 to
its parent component with id : '_idJsp0' and path '{Component-Path :
[Class: javax.faces.component.UIViewRoot,ViewId:
/jsp/reportParameters.jspx][Class:
javax.faces.component.html.HtmlForm,Id: _idJsp0]}'at position :2 in
list of children. This might be a problem due to a duplicate id in a
previously added component,if this is the case, the problematic id
might be one of : _idJsp1,_idJsp2
        at 
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:425)
        at 
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
        at 
oracle.adfinternal.view.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)
        at 
org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
        at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)


marko

Reply via email to