A similar discussion is on the whiteboard for Shale.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33752#c7

Gary


> In the mean time (working offline) I found also that the
> myComponent.getChildren().add(childComponent); works like a
> breeze.
> Again Kito Mann's "JSF in Action" had the solution.
> 
> But the hint with the process("someJsp.jsp") might be usefull in the future
> 
> Thanks
> Alexander
> 
> -----Original Message-----
> From: Vincent Sevel [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, March 24, 2005 6:39 PM
> To: 'MyFaces Discussion'; [EMAIL PROTECTED]
> Subject: RE : Custom Components with child-components
> 
> Any way we could delegate the construction of the children component
> tree to a JSP rather than building the tree programmatically?
> 
> Something like :
>       myComponent.getChildren().add(process("/myComponentBody.jsp"))
> 
> Allowing a mapping between pseudo-beans used in this JSP (like foo in
> #{fooBean.bar}) and real beans that would be used by the client of our
> component would also add a great deal of flexibility to our component
> (kind of like myfaces aliasBean):
> 
> <!-- client.jsp -->
> <myComponent fooBean="#{myRealBean}"/>
> 
> ---------------------------
> 
> <!-- myComponentBody.jsp -->
> <h:inputText value="#{fooBean.bar}"/>
> 
> This would greatly simplify development of reusable panels.
> 
> Vince
> 
> -----Message d'origine-----
> De�: Craig McClanahan [mailto:[EMAIL PROTECTED] 
> Envoy�: jeudi, 24. mars 2005 16:52
> ��: MyFaces Discussion
> Objet�: Re: Custom Components with child-components
> 
> Option b is definitely the correct answer.  To add a child:
> 
>     myComponent.getChildren().add(childComponent);
> 
> Craig
> 
> 
> 
> On Thu, 24 Mar 2005 10:58:01 +0100, Jesse Alexander (KBSA 21)
> <[EMAIL PROTECTED]> wrote:
> > I have to create custom components that contain child components.
> > Eg:
> >  a layout component that will contain some HtmlCommandLink components
> > 
> > I think basically I have two choices:
> > a) do all the rendering myself
> > b) instantiate the child components and let them do their own
> rendering
> > 
> > a) has several bad smells ;-)
> > 
> > b) is my preferred way. But
> > 
> > When I add a HtmlCommandLink to a JSP-page I use the h:commandLink tag
> and
> > usually embed to other tags within: the f:param and the h:outputText.
> > How can I do this in my custom-component?  So far I have not found a
> method
> > like: "xyz.addChild(UiComponent)" or similar.
> > 
> > Has somebody already gone that way or has somebody an idea about it?
> > 
> > thanks
> > Alexander
> >

Reply via email to