views:

15

answers:

1

Per this question I tried the following

<h:selectOneMenu id="branchSelect" value="#{cloner.branchType}">
    <a4j:support event="onchange" ajaxSingle="true" rerender="branchSelect, branchPanel" />
    <f:selectItem itemLabel="Constant" itemValue="constant" />
    <f:selectItem itemLabel="Pattern" itemValue="pattern" />
</h:selectOneMenu>
<rich:togglePanel id="branchPanel" value="#{cloner.branchType}" switchType="ajax"
        initialState="constant">
    <f:facet name="constant">
        <h:outputText value="Some block specific to Constant option" />
    </f:facet>
    <f:facet name="pattern">
        <h:outputText value="Some block specific to Pattern option" />
    </f:facet>
</rich:togglePanel>

Of course my backing bean has a setter/getter for branchType, and I can see that branchType is indeed being set when the select is changed. The toggle panel just isn't changing.

A: 

Have you tried enclosing it within an <h:form> ?

anyway is reRender and not rerender

I'm trying to reRender the togglePanel and it does not work, I can't understand why. I've tried to enclose it into several things and tried to reRender them and nothing, it's only rendered when the page loads.

pakore