Pessoal, estou tentando criar o meu sistema para o TCC e até agora não consegui nada rodar além do cadastro de usuários. Isto é… Se o cadastro de usuários ainda funciona, porque eu alterei a classe usuarioBean pra fazer a página de gerenciamento de usuarios, com o objetivo de inserir uma tabela que listasse todos os usuarios do banco e desse as opções de inserir ou alterar.
Porém com o novo Bean, o console vários erros. Tenho uma semana apenas até a minha banca!!!
Erros:
1100: /GerenciarUsuarios.xhtml @29,45 value="#{usuarioBean.usuario.nome}": Target Unreachable, ‘usuario’ returned null
javax.faces.FacesException: /GerenciarUsuarios.xhtml @29,45 value="#{usuarioBean.usuario.nome}": Target Unreachable, ‘usuario’ returned null
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:84)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1502)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1458)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.el.PropertyNotFoundException: /GerenciarUsuarios.xhtml @29,45 value="#{usuarioBean.usuario.nome}": Target Unreachable, ‘usuario’ returned null
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:95)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1046)
at javax.faces.component.UIInput.validate(UIInput.java:976)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1249)
at javax.faces.component.UIInput.processValidators(UIInput.java:712)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at org.primefaces.component.fieldset.Fieldset.processValidators(Fieldset.java:189)
at javax.faces.component.UIForm.processValidators(UIForm.java:253)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at org.primefaces.component.layout.Layout.processValidators(Layout.java:233)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1195)
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
… 24 more
Caused by: javax.el.PropertyNotFoundException: Target Unreachable, ‘usuario’ returned null
at org.apache.el.parser.AstValue.getTarget(AstValue.java:124)
at org.apache.el.parser.AstValue.getType(AstValue.java:58)
at org.apache.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:168)
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:98)
… 39 more
jun 17, 2016 7:28:10 PM com.sun.faces.context.ExceptionHandlerImpl log
1100: JSF1073: javax.faces.application.ViewExpiredException obtido durante o processamento de RESTORE_VIEW 1: UIComponent-ClientId=, Message=viewId:/GerenciarUsuarios.xhtml - A exibição de /GerenciarUsuarios.xhtml não pôde ser restaurada.
jun 17, 2016 7:28:10 PM com.sun.faces.context.ExceptionHandlerImpl log
1100: viewId:/GerenciarUsuarios.xhtml - A exibição de /GerenciarUsuarios.xhtml não pôde ser restaurada.
javax.faces.application.ViewExpiredException: viewId:/GerenciarUsuarios.xhtml - A exibição de /GerenciarUsuarios.xhtml não pôde ser restaurada.
at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:212)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:123)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1502)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1458)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
jun 17, 2016 7:28:15 PM com.sun.faces.context.SessionMap put
ADVERTÊNCIA: JSF1063: AVISO! Definindo valor de atributo não serializável em HttpSession (chave: usuarioBean, classe do valor: br.com.carboscore.bean.usuarioBean).
jun 17, 2016 7:28:19 PM com.sun.faces.lifecycle.ProcessValidationsPhase execute
ADVERTÊNCIA: /GerenciarUsuarios.xhtml @29,45 value="#{usuarioBean.usuario.nome}": Target Unreachable, ‘usuario’ returned null
javax.el.PropertyNotFoundException: /GerenciarUsuarios.xhtml @29,45 value="#{usuarioBean.usuario.nome}": Target Unreachable, ‘usuario’ returned null
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:95)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1046)
at javax.faces.component.UIInput.validate(UIInput.java:976)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1249)
at javax.faces.component.UIInput.processValidators(UIInput.java:712)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at org.primefaces.component.fieldset.Fieldset.processValidators(Fieldset.java:189)
at javax.faces.component.UIForm.processValidators(UIForm.java:253)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at org.primefaces.component.layout.Layout.processValidators(Layout.java:233)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1195)
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1502)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1458)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.el.PropertyNotFoundException: Target Unreachable, ‘usuario’ returned null
at org.apache.el.parser.AstValue.getTarget(AstValue.java:124)
at org.apache.el.parser.AstValue.getType(AstValue.java:58)
at org.apache.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:168)
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:98)
… 39 more
jun 17, 2016 7:28:19 PM com.sun.faces.context.ExceptionHandlerImpl log
1100: JSF1073: javax.faces.FacesException obtido durante o processamento de PROCESS_VALIDATIONS 3: UIComponent-ClientId=, Message=/GerenciarUsuarios.xhtml @29,45 value="#{usuarioBean.usuario.nome}": Target Unreachable, ‘usuario’ returned null
jun 17, 2016 7:28:19 PM com.sun.faces.context.ExceptionHandlerImpl log
1100: /GerenciarUsuarios.xhtml @29,45 value="#{usuarioBean.usuario.nome}": Target Unreachable, ‘usuario’ returned null
javax.faces.FacesException: /GerenciarUsuarios.xhtml @29,45 value="#{usuarioBean.usuario.nome}": Target Unreachable, ‘usuario’ returned null
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:84)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:646)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1502)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1458)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.el.PropertyNotFoundException: /GerenciarUsuarios.xhtml @29,45 value="#{usuarioBean.usuario.nome}": Target Unreachable, ‘usuario’ returned null
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100)
at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getConvertedValue(HtmlBasicInputRenderer.java:95)
at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1046)
at javax.faces.component.UIInput.validate(UIInput.java:976)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1249)
at javax.faces.component.UIInput.processValidators(UIInput.java:712)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at org.primefaces.component.fieldset.Fieldset.processValidators(Fieldset.java:189)
at javax.faces.component.UIForm.processValidators(UIForm.java:253)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at org.primefaces.component.layout.Layout.processValidators(Layout.java:233)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1195)
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
… 24 more
Caused by: javax.el.PropertyNotFoundException: Target Unreachable, ‘usuario’ returned null
at org.apache.el.parser.AstValue.getTarget(AstValue.java:124)
at org.apache.el.parser.AstValue.getType(AstValue.java:58)
at org.apache.el.ValueExpressionImpl.getType(ValueExpressionImpl.java:168)
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:98)
… 39 more
Bean:
package br.com.carboscore.bean;
import java.util.ArrayList;
import java.util.List;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.servlet.http.HttpSession;
import br.com.carboscore.fachada.Fachada;
import br.com.carboscore.model.Usuario;
@ManagedBean (name = "usuarioBean")
@SessionScoped
@SuppressWarnings("rawtypes")
public class usuarioBean {
private Usuario usuario = new Usuario();
private Fachada fachada;
private List<Usuario> listaUsuario;
private List<Usuario> listUsuario;
@SuppressWarnings("unchecked")
public usuarioBean() {
this.usuario = new Usuario();
this.fachada = Fachada.getInstanceFachada();
this.listaUsuario = new ArrayList<Usuario>();
}
public Usuario getUsuario() {
return usuario;
}
public void setUsuario(Usuario usuario) {
this.usuario = usuario;
}
public String logarusuario(){
Usuario usuariook = new Usuario();
usuariook = usuarioExisteNoBanco(usuario);
//testa se o usuario existe no banco se exister, retorna logado, se o usuario for igual a nulo, retorna para pagina index;
if(usuariook == null){
usuario = new Usuario();
FacesContext menssagem = FacesContext.getCurrentInstance();
menssagem.addMessage(null, new FacesMessage("Usuario invalido"));
return "logar.xhtml";
}else {
FacesContext fc = FacesContext.getCurrentInstance();
ExternalContext ec = fc.getExternalContext();
HttpSession session = (HttpSession) ec.getSession(false);
session.setAttribute("usuario", usuariook);
return "cadastro.xhml";
}
}
public Usuario usuarioExisteNoBanco(Usuario usuario) {
listaUsuario = fachada.controler.listarUsuarios();
for (Usuario usuarioset : listaUsuario) {
String loginset = usuarioset.getLogin();
String senhaset = usuarioset.getSenha();
// coloca um usuario em cada atributo dos usuarios da lista
Usuario usuarioTeste = new Usuario();
usuarioTeste.setLogin(loginset);
usuarioTeste.setSenha(senhaset);
// testa se o login do usuario da lista é o mesmo login do usuario da pagina
//testa o login
if (usuarioTeste.getLogin().equals(usuario.getLogin())) {
System.out.println("login ok");
//testa a senha
if (usuarioTeste.getSenha().equals(usuario.getSenha())) {
System.out.println("senha ok");
Usuario usuarioOK = usuarioset;
return usuarioOK;//retorna o usuario logado
}
}
}
return null;//se ele não existir retorna null;
}
public String sairlogin(){
FacesContext fc = FacesContext.getCurrentInstance();
ExternalContext ec = fc.getExternalContext();
HttpSession session = (HttpSession) ec.getSession(false);
session.removeAttribute("usuario");
return "index.xhtml";
}
public void testausuario(){
System.out.println(usuario.getLogin());
System.out.println(usuario.getSenha());
}
//Get e set da lista de usuarios;
public List<Usuario> getListUsuario() {
listUsuario = fachada.controler.listarUsuarios();
return listUsuario;
}
public void setListUsuario(List<Usuario> listUsuario) {
this.listUsuario = listUsuario;
}
//salvar usuario
public String salvarusuario() {
fachada.controler.cadastrarUsuario(usuario);
usuario = new Usuario();
FacesContext menssagem = FacesContext.getCurrentInstance();
menssagem.addMessage(null, new FacesMessage("Usuario salvo com sucesso"));
return "CadastrarUsuario.xhtml";
}
//listar usuarios
public String listarusuario(){
return "GerenciarUsuarios.xhtml";
}
//excluir usuario
public String excluirusuario(Usuario usuario){
fachada.controler.excluirUsuario(usuario);
FacesContext menssagem = FacesContext.getCurrentInstance();
menssagem.addMessage(null, new FacesMessage("Usuario excluido com sucesso"));
return "GerenciarUsuarios.xhtml";
}
//prepara editação e redireciona pra pagina editar.xhtml
public String preparaEdicao(Usuario usuario){
this.usuario = usuario;
System.out.println(this.usuario.getIdusuario());
return "GerenciarUsuarios.xhtml";
}
//edita o lutador e salva no banco
public String editar(){
fachada.controler.editarUsuario(usuario);
System.out.println(usuario.getIdusuario());
FacesContext menssagem = FacesContext.getCurrentInstance();
menssagem.addMessage(null, new FacesMessage("Usuario editado com sucesso"));
return "GerenciarUsuarios.xhtml";
}
}
Página Gerenciar Usuários:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:decorate xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:h="http://java.sun.com/jsf/html" template="Layout.xhtml">
<ui:define name="centro">
<h:form>
<p:growl id="msgs" showDetail="true" />
<p:fieldset legend="Gerenciar Usuários" style="margin-bottom:20px">
<h:outputLabel value="Id: " for="idusuario"></h:outputLabel>
<h:outputText id="idusuario" value="#{usuarioBean.usuario.idusuario}"></h:outputText>
<h:outputLabel value="Tipo: " for="tipo"></h:outputLabel>
<h:selectOneRadio id="tipo"
value="#{usuarioBean.usuario.tipo}">
<f:selectItem itemLabel="1" itemValue="Administrador"></f:selectItem>
<f:selectItem itemLabel="2" itemValue="Usuário"></f:selectItem>
</h:selectOneRadio>
<h:outputLabel value="Nome: " for="nome" />
<h:inputText styleClass="span5" id="nome"
value="#{usuarioBean.usuario.nome}" />
<h:outputLabel value="Sobrenome: " for="sobrenome" />
<h:inputText styleClass="span5" id="sobrenome"
value="#{usuarioBean.usuario.sobrenome}" />
<h:outputLabel value="Sexo: " for="sexo"></h:outputLabel>
<h:selectOneRadio id="sexo"
value="#{usuarioBean.usuario.sexo}">
<f:selectItem itemLabel="Masculino" itemValue="M"></f:selectItem>
<f:selectItem itemLabel="Feminino" itemValue="F"></f:selectItem>
</h:selectOneRadio>
<h:outputLabel value="CPF: " for="cpf" />
<h:inputText styleClass="span5" id="cpf"
value="#{usuarioBean.usuario.cpf}" />
<h:outputLabel value="Login: " for="login" />
<h:inputText styleClass="span5" id="login"
value="#{usuarioBean.usuario.login}" />
<h:outputLabel value="Senha: " for="senha" />
<h:inputText styleClass="span5" id="senha"
value="#{usuarioBean.usuario.senha}" />
<h:outputLabel value="Estado: " for="estado" />
<h:inputText styleClass="span5" id="estado"
value="#{usuarioBean.usuario.senha}" />
<h:commandButton value="Editar"
action="#{usuarioBean.editar()}" />
</p:fieldset>
</h:form>
</ui:define>
</ui:decorate>