I am trying to render an input box based on the value selected in the drop down.
I had placed the input box under a panelGrid as below
<h:panelGrid id="pnl1" styleClass="Container90"
columnClasses="Wid20, Wid80" columns="2" cellpadding="5">
<p:outputLabel for="clientRegAcessToken1"
value="Client Registration Token"
rendered="#{clientRegistration.regSecretShown}" />
<p:inputText id="clientRegAcessToken1"
rendered="#{clientRegistration.regSecretShown}"
value="#{clientRegistration.regToken}" />
</h:panelGrid>
I have the selectOneMenu as below
<p:selectOneMenu styleClass="w250"
id="idTokenSignedResponseAlg"
value="#{clientRegistration.client.idTokenSignedResponseAlg}"
>
<f:selectItems
value="#{clientRegistration.getJwsAlgorithms()}" var="algo"
itemValue="#{algo}" itemLabel="#{algo.name}" />
<p:ajax update="ViewClientRegistration:pnl1"
listener="#{clientRegistration.onHmacSigningKeySelected}"/>
</p:selectOneMenu>
Method definition in the bean (ViewScoped) is as below
public void onHmacSigningKeySelected(AjaxBehaviorEvent event) {
System.out.println("Entered" + client.getIdTokenSignedResponseAlg());
regSecretShown=true;
}
I see that changing the value is sending a network request. However, I am not seeing the method getting executed on the server side. Is there something I am missing ?