> There are three ways to do this that I have successfully used. > > #1) Programmically create a set of controls as a new component. > > #2) Use x:aliasBean and a jsp include to represent your composite control. > > #3) Use ui:composition with the facelets library. > > #1 is the hardest, most involved, and most fragile way to do it. > > #2 is easy and requires only a dependency on x:aliasBean. There are > possibly some issues with nesting x:aliasBean controls, however. > > #3 is also easy and requires a dependency on the facelets library. > > The resulting code for #2 and #3 are very similar, and converting > between them is trivial in most cases. > > Shale's Clay subproject probably also offers similar functionality, > but I haven't used it yet. >
You can find a good clay example in the "roledex" usecase. There has been some recent problems with the nightly builds but I think this one is ok (http://cvs.apache.org/builds/struts/nightly/struts-shale/use-cases/struts-shale-usecases-20050724.zip). We have an outstanding patch to support client side state saving for full html view composition. Maybe you myfaces guys might be able to give me some direction on the URL state saving? http://issues.apache.org/bugzilla/show_bug.cgi?id=35764 Gary > You can find an example of #1 in issue MYFACES-331: > > http://issues.apache.org/jira/secure/attachment/12311217/RowAndColumnRelationshi > pComponent.zip > > An example of using #2 (without the custom component code) would look like > this: > > <x:aliasBean alias="#{backingBean}" > value="#{activityTypeCategoryActivityTypeListRelationshipDataBackingBean}"> > <f:subview > id="activityTypeCategoryActivityTypeListRelationshipDataDataTableView"> > <jsp:include > page="/pages/BooleanRelationshipDataTable.jsp"/> > </f:subview> > </x:aliasBean> > > An example of use #3 (without the custom component code) would look like this: > > <ui:include src="/pages/BooleanRelationshipDataTable.xhtml"> > <ui:param name="backingBean" > value="#{activityTypeCategoryActivityTypeListRelationshipDataBackingBean}"/> > </ui:include> > > -Mike > > > > > On 7/28/05, Dennis Byrne <[EMAIL PROTECTED]> wrote: > > I can't seem to find a lot of resources on creating composite > > controls ( an .ascx in .NET speak ). Does anyone have a web > > site or a war story for this? > > Dennis Byrne > >

