I have a h:selectOneMenu, and when its value changes to specific value (say "2"), it supposes to show hidden fields then(which hasn't been rendered). Noting that they are linked to the same value of a property in the managed bean.
<h:outputText value="Function:"></h:outputText>
<h:selectOneMenu id="funDrp" converter="FunctionConv" value="#{cardBean.card.functionId}">
<f:selectItems value="#{commonData.functions}" var="c" itemLabel="#{c.description}" itemValue="#{c.functionId}" />
<f:ajax render="@form" execute="@form" event="valueChange" />
</h:selectOneMenu>
<h:outputText value=" Profile Id:" rendered="#{(cardBean.card.functionId.functionId==2)}"></h:outputText>
<h:inputText id="card_refillProfileId"rendered="#{(cardBean.card.functionId.functionId==2)}" label="Refill Profile Id" required="true" value="#{cardBean.card.refillProfileId}"></h:inputText>
<h:outputText value="Origin Type:" rendered="#{(cardBean.card.functionId.functionId==2)}"></h:outputText>
<h:inputText id="card_originType" rendered="#{(cardBean.card.functionId.functionId==2)}" label="Origin Node Type" required="true" value="#{cardBean.card.originType}"></h:inputText>
They works fine if the "card" object is assigned to an existing entity, but if it is a new one - it doesnt work as expected.