Guest User

Untitled

a guest
Jun 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. <p:selectOneMenu value="#{funcionarioBean.funcionarioCadastro.funcao}">
  2.  
  3. o value eu ligo ele com o meu modelo
  4.  
  5. ItemValue eh o q ele vai gravar
  6.  
  7. ItemLabel é o q vai aparecer para o usuario
  8.  
  9. <f:selectItem itemValue="" itemLabel="Selecione uma função" />
  10. <f:selectItem itemValue="Administrador" itemLabel="Administrador" />
  11. <f:selectItem itemValue="Balconista" itemLabel="Balconista" />
  12. <f:selectItem itemValue="Gerente" itemLabel="Gerente" />
  13.  
  14. Tem gente q prefere colocar no ItemLabel Administrador e no ItemValue gravar a
  15. o autor prefere colocar tb no itemValue Administrador para qdo entrar direto no banco saber do q se trata
  16.  
  17.  
  18. <p:outputLabel value="Função" />
  19. <p:selectOneMenu value="#{funcionarioBean.funcionarioCadastro.funcao}">
  20. <f:validateBean/>
  21. <f:selectItem itemValue="" itemLabel="Selecione uma função" />
  22. <f:selectItem itemValue="Administrador" itemLabel="Administrador" />
  23. <f:selectItem itemValue="Balconista" itemLabel="Balconista" />
  24. <f:selectItem itemValue="Gerente" itemLabel="Gerente" />
  25.  
  26.  
  27. </p:selectOneMenu>
  28. ====================================
Add Comment
Please, Sign In to add comment