Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <p:selectOneMenu value="#{funcionarioBean.funcionarioCadastro.funcao}">
- o value eu ligo ele com o meu modelo
- ItemValue eh o q ele vai gravar
- ItemLabel é o q vai aparecer para o usuario
- <f:selectItem itemValue="" itemLabel="Selecione uma função" />
- <f:selectItem itemValue="Administrador" itemLabel="Administrador" />
- <f:selectItem itemValue="Balconista" itemLabel="Balconista" />
- <f:selectItem itemValue="Gerente" itemLabel="Gerente" />
- Tem gente q prefere colocar no ItemLabel Administrador e no ItemValue gravar a
- o autor prefere colocar tb no itemValue Administrador para qdo entrar direto no banco saber do q se trata
- <p:outputLabel value="Função" />
- <p:selectOneMenu value="#{funcionarioBean.funcionarioCadastro.funcao}">
- <f:validateBean/>
- <f:selectItem itemValue="" itemLabel="Selecione uma função" />
- <f:selectItem itemValue="Administrador" itemLabel="Administrador" />
- <f:selectItem itemValue="Balconista" itemLabel="Balconista" />
- <f:selectItem itemValue="Gerente" itemLabel="Gerente" />
- </p:selectOneMenu>
- ====================================
Add Comment
Please, Sign In to add comment