Hey guys,
Thanks so much for your attentive responses to my messages, let me know
if I'm asking too many questions. I'm just trying to migrate a medium
sized app (it's opensource but not ready for any kind of public release
yet;) over to 2.0 which is why I'm running into these issues.
To answer your question, the use case is that multiple parameters of the
same type must be passed into the component. I'm not sure if there's a
way to pass multiple parameters otherwise. There could be as few as
zero, but as many as N parameters, as defined by a configuration file
which maps URLs to JSF views.
Thanks again,
--Lincoln
On Wed, 2009-01-07 at 09:21 -0800, Jim Driscoll wrote:
> Hi Lincoln -
>
> Out of curiosity, why does it have to be a parameter, and not an
> attribute? (This is completely separate from the question of whether it
> should work or not, I'm just curious for the use case.)
>
> So, instead of
> <ocp:link value="#{myBean.getMappingId}">
> <f:param value="${myBean.name}" /> <!-- This param never makes it to
> where it needs to go -->
> My Link Text
> </ocp:link>
>
> You would say:
> <ocp:link value="#{myBean.getMappingId}" param="${myBean.name}" >
> My Link Text
> </ocp:link>
>
> Jim
>
> Lincoln Baxter, III wrote:
> > Hi all,
> >
> > I'm attempting to create an EZComp composite:component that takes
> > multiple <f:param value=""/> tags and passes them to a sub-element, but
> > it seems like all children are encased within a UIOutput component, thus
> > f:param tag is not available as a child of the EZComp component itself,
> > and my renderer class is not getting the values it needs.
> >
> > <ocp:link value="#{myBean.getMappingId}">
> > <f:param value="${myBean.name}" /> *<!-- This param never makes it
> > to where it needs to go -->*
> > My Link Text
> > </ocp:link>
> >
> >
> > Is there any way to pass a parameter directly through the component so
> > that the internals receive the parameter? <f:facet> instead of
> > <composite:insertChildren /> does not seem to work either, and would end
> > up cluttering my interface. I just want a straight passthrough like the
> > original <ui:insert /> behaved in facelets. Anything like it?
> >
> > Thanks,
> >
> > Here is my component:
> >
> > <html xmlns="http://www.w3.org/1999/xhtml"
> > xmlns:h="http://java.sun.com/jsf/html"
> > xmlns:f="http://java.sun.com/jsf/core"
> > xmlns:ui="http://java.sun.com/jsf/facelets"
> > xmlns:pretty="http://ocpsoft.com/prettyfaces"
> > xmlns:composite="http://java.sun.com/jsf/composite">
> >
> > <composite:interface>
> > <composite:attribute name="value" required="true" />
> > <composite:attribute name="type" default="mapping" />
> > <composite:attribute name="rendered" default="true" />
> > </composite:interface>
> >
> > <composite:implementation>
> > <f:subview id="linkGroup"
> > rendered="#{compositeComponent.attrs.rendered ne 'false'}">
> > <pretty:link mappingId="#{compositeComponent.attrs.value}"
> > rendered="#{compositeComponent.attrs.type eq 'mapping' || empty
> > compositeComponent.attrs.type}">
> > <composite:insertChildren /> *<!-- This is where the param needs to
> > go -->*
> > </pretty:link>
> > <h:outputLink value="#{compositeComponent.attrs.value}"
> > rendered="#{compositeComponent.attrs.type eq 'url'}">
> > <composite:insertChildren />
> > </h:outputLink>
> > </f:subview>
> > </composite:implementation>
> >
> > </html>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: webtier-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: webtier-help_at_glassfish.dev.java.net
>