I have the next code:
<h:form id="form" >
<h:panelGrid >
<p:inputText placeholder="Name" value="#{controladorGestionGrados.otherValue}" />
<p:selectOneMenu value="#{controladorGestionGrados.value}" >
<f:selectItem itemValue="A" itemLabel="A" />
<f:selectItem itemValue="B" itemLabel="B" />
<f:selectItem itemValue="C" itemLabel="C" />
<p:ajax update=":form" />
</p:selectOneMenu>
<p:outputLabel id="someText"
value="Some text"
rendered="#{controladorGestionGrados.value eq 'C'}" />
</h:panelGrid>
</h:form>
First: I write anything in the inputText. Second: I select option C.
After, the outputLabel "Some text" is displayed, but the inputText is reseted.
How I can change the value of "selectOneMenu" without restart the "inputText"?
I've tried:
<p:ajax update="someText" />
But effectively the inputText don't reset, but outLabel don't show.