webtier@glassfish.java.net

JSF2 <renderUsingPageChildren> not passing SelectOneMenu items

From: Lincoln Baxter, III <lincolnbaxter_at_gmail.com>
Date: Sat, 11 Apr 2009 11:29:38 -0400

The list is empty:

Client code:
        <ocp:inputOutputSelectOneMenu id="status" value="#{viewBean.status}"
                editable="#{authorizationBean.isMember}">
                <f:selectItems value="#{viewBean.taskStatuses}"
                        var="status" itemLabel="#{status.status}" itemValue="#{status}" />
                <f:valueChangeListener for="value"
                        binding="#{homeBean.changeStatusListener}" />
        </ocp:inputOutputSelectOneMenu>


Component code:

<composite:interface>
        <composite:attribute name="value" required="true" />
        <composite:attribute name="editable" default="true" />
        <composite:attribute name="size" />
        <composite:editableValueHolder name="value" targets="valueInput" />
        <composite:renderUsingPageChildren />
</composite:interface>

<composite:implementation>
        <h:outputText value="#{compositeComponent.attrs.value}"
                rendered="#{compositeComponent.attrs.editable eq 'false'}" />
        <h:selectOneMenu id="valueInput"
                value="#{compositeComponent.attrs.value}"
                size="#{compositeComponent.attrs.size}"
                rendered="#{compositeComponent.attrs.editable ne 'false'}">
                <composite:renderUsingPageChildren />
        </h:selectOneMenu>
</composite:implementation>