[jboss-user] [JBoss Seam] - Re: programmatically apply a template to UIDecorate?

charles.crouch@jboss.com do-not-reply at jboss.com
Fri May 11 14:02:11 EDT 2007


Ok, so let me just try and repeat back what I understand your sugestion to be:

Instead of using binding:

<h:panelGrid binding="#{dynamicPanelGridTest}" />	

I would create my own tag handler, extending MetaTagHandler it looks like, and that in the page would go:

<myTag:renderForm formDefinition="#{myFormSchema}"/>


This tag handler implementation would then get the reference to the myFormSchema which lists what form elements should be included on the form. It would then iterate over this list calling ctx.includeFacelet(parent, faceletURL) appropriately for each form element, e.g. pseudo code...

ctx.includeFacelet(parent, /include/formTextComponent.xhtml);
ctx.includeFacelet(parent, /include/formRadioComponent.xhtml);
ctx.includeFacelet(parent, /include/formTextComponent.xhtml);

So how would I tell it each time I include a facelets page to use a different set of param's? e.g. duplicating this...


  |       <ui:include src="/include/formTextComponent.xhtml">
  |          <ui:param name="label" value="#{label1}"/>
  |          <ui:param name="beanValue" value="#{value1}"/>
  |       </ui:include>
  |       
  |       <ui:include src="/include/formRadioComponent.xhtml">
  |          <ui:param name="label" value="#{label2}"/>
  |          <ui:param name="beanValue" value="#{value2}"/>
  |          <ui:param name="itemValues" value="#{listValues}"/>
  |       </ui:include>
  | 
  |       <ui:include src="/include/formTextComponent.xhtml">
  |          <ui:param name="label" value="#{label3}"/>
  |          <ui:param name="beanValue" value="#{value3}"/>
  |       </ui:include>
  |   

Thanks

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045091#4045091

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045091



More information about the jboss-user mailing list