I need to make a simple align using p:outputLabel and p:selectOneMenu like this basic example
But, it’s just working when I using p:inputText.
I need something like this:
<p:panelGrid columns="2">
<h:outputLabel for="idName" value="* #{msg.select_name}: " required="true" />
<p:selectOneMenu id="idSName" value="#{manage.name}">
<f:selectItems value="#{manage.listNames}" />
</p:selectOneMenu>
<h:outputLabel for="idCountry" value="#{msg.select_country}: " required="true" />
<p:selectOneMenu id="idCountryCustomer" value="#{manage.countrySelected}">
<f:selectItems value="#{manage.listCountryCustomer}" />
</p:selectOneMenu>
</p:panelGrid>
You used
for="idName"in your<h:outputLabel>, however the id of<p:selectOneMenu>is “idSName”. The names have to match.You may also try
<p:outputLabel>instead of<h:outputLabel>.