You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I set the attribute required="true" for a b:inputText and I don't fill this field, besides presenting the message, the field also becomes red. But when using a b:selectOneMenu, it dosen't change the color, it continues black.
Did I forget something?
Basically my code is this bellow:
<b:inputText label="Placa" value="#{myBean.placa}" required="true" requiredMessage="Placa deve ser informada" />
<b:selectOneMenu label="Marca" value="#{myBean.marca}" required="true" requiredMessage="Marca deve ser informada" >
<f:selectItem itemLabel="Selecione a marca" itemValue="" noSelectionOption="true" />
<f:selectItems value="#{myBean.marcas}" var="mr" itemLabel="#{mr.descricao}" itemValue="#{mr}" />
</b:selectOneMenu>
<b:selectOneMenu label="Modelo" value="#{myBean.veiculo.modelo}" required="true" requiredMessage="Modelo deve ser informado" >
<f:selectItem itemLabel="Selecione o modelo" itemValue="" noSelectionOption="true" />
<f:selectItems value="#{myBean.modelos}" var="md" itemLabel="#{md.descricao}" itemValue="#{md}" />
</b:selectOneMenu>
The text was updated successfully, but these errors were encountered:
OK, I've solved the issue. The input field and the surrounding div both need ids, so I used the wrong it to determine whether there's a FacesMessage or not. I've uploaded the current Snapshot to Maven Central, so you can test it. See #369 on how to get it.
Hi!
When I set the attribute required="true" for a b:inputText and I don't fill this field, besides presenting the message, the field also becomes red. But when using a b:selectOneMenu, it dosen't change the color, it continues black.
Did I forget something?
Basically my code is this bellow:
<b:inputText label="Placa" value="#{myBean.placa}" required="true" requiredMessage="Placa deve ser informada" />
<b:selectOneMenu label="Marca" value="#{myBean.marca}" required="true" requiredMessage="Marca deve ser informada" >
<f:selectItem itemLabel="Selecione a marca" itemValue="" noSelectionOption="true" />
<f:selectItems value="#{myBean.marcas}" var="mr" itemLabel="#{mr.descricao}" itemValue="#{mr}" />
</b:selectOneMenu>
<b:selectOneMenu label="Modelo" value="#{myBean.veiculo.modelo}" required="true" requiredMessage="Modelo deve ser informado" >
<f:selectItem itemLabel="Selecione o modelo" itemValue="" noSelectionOption="true" />
<f:selectItems value="#{myBean.modelos}" var="md" itemLabel="#{md.descricao}" itemValue="#{md}" />
</b:selectOneMenu>
The text was updated successfully, but these errors were encountered: