Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Required field b:selectOneMenu doesn't change the color #565

Closed
ruanfelisky opened this issue Nov 24, 2016 · 5 comments
Closed

Required field b:selectOneMenu doesn't change the color #565

ruanfelisky opened this issue Nov 24, 2016 · 5 comments
Assignees
Milestone

Comments

@ruanfelisky
Copy link

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>

image

@stephanrauh
Copy link
Collaborator

I suppose you're referring to the color of the label? The field is rendered black in each of your three examples.

@stephanrauh
Copy link
Collaborator

I've managed to reproduce the bug.

@ruanfelisky
Copy link
Author

Hi, that's right, sorry, it's the label.
Tks.

stephanrauh added a commit that referenced this issue Dec 6, 2016
@stephanrauh
Copy link
Collaborator

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.

@ruanfelisky
Copy link
Author

I've tested the current Snapshot and it's ok!
Thank you.

@stephanrauh stephanrauh added this to the v1.0.1 milestone Dec 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants