Skip to main content

[webtier] JSF2 not passing SelectOneMenu items

2 replies [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Ryan Lubke

This is the correct behavior. The 'renderUsingPageChildren' renders the
output of a component in
the location referenced by that tag. If the children being referenced
don't have renderers (as selectItems
do not), then no output will be produced.

Currently, and this may change in time for 2.0, there is no way to
re-locate children of a composite
component to a location within the composite component implementation.

For you use case, you'd have to pass in the items, variable name, label,
and value as attributes
on the composite component itself and pass them through to f:selectItems
within the composite
implementation.

On 4/11/09 8:29 AM, Lincoln Baxter, III wrote:
> The list is empty:
>
> *Client code:*
> > editable="#{authorizationBean.isMember}">
> > var="status" itemLabel="#{status.status}" itemValue="#{status}" />
> > binding="#{homeBean.changeStatusListener}" />
>

>
>
> *Component code:*
>
>
>
>
>
>
>
>

>
>
> > rendered="#{compositeComponent.attrs.editable eq 'false'}" />
> > value="#{compositeComponent.attrs.value}"
> size="#{compositeComponent.attrs.size}"
> rendered="#{compositeComponent.attrs.editable ne 'false'}">
>
>

>

[att1.html]

Lincoln Baxter, III

Gotcha, thanks.

On Sat, 2009-04-11 at 09:16 -0700, Ryan Lubke wrote:

> This is the correct behavior. The 'renderUsingPageChildren' renders
> the output of a component in
> the location referenced by that tag. If the children being referenced
> don't have renderers (as selectItems
> do not), then no output will be produced.
>
> Currently, and this may change in time for 2.0, there is no way to
> re-locate children of a composite
> component to a location within the composite component implementation.
>
> For you use case, you'd have to pass in the items, variable name,
> label, and value as attributes
> on the composite component itself and pass them through to
> f:selectItems within the composite
> implementation.
>
> On 4/11/09 8:29 AM, Lincoln Baxter, III wrote:
>
> > The list is empty:
> >
> > Client code:
> > > > editable="#{authorizationBean.isMember}">
> > > > var="status" itemLabel="#{status.status}" itemValue="#{status}" />
> > > > binding="#{homeBean.changeStatusListener}" />
> >

> >
> >
> > Component code:
> >
> >
> >
> >
> >
> >
> >
> >

> >
> >
> > > > rendered="#{compositeComponent.attrs.editable eq 'false'}" />
> > > > value="#{compositeComponent.attrs.value}"
> > size="#{compositeComponent.attrs.size}"
> > rendered="#{compositeComponent.attrs.editable ne 'false'}">
> >
> >

> >

>
>
[att1.html]