Boa noite galera..
Estou com mais um probleminha.. tenho um tela de login que estou testando, e a mesma não esta fazendo nada ..
clico no botão entrar e não faz nada ....
segue o XHTML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">
<h:head>
<title>teste</title>
<link type="text/css" rel="stylesheet"
href="#{facesContext.externalContext.requestContextPath}/css/template.css" />
</h:head>
<h:body>
<h:form>
<p:layoutUnit position="center" style="border:0px;">
<p:spacer height="250px" />
<p:panel header="Bem-Vindo(a)"
style="width:500px;margin-left:auto;margin-right:auto;border: 1px solid #000000;box-shadow:10px 10px 5px black;">
<h:panelGrid columns="2" style="margin-left:auto;margin-right:auto;">
<h:outputLabel value="Usuário:" />
<p:inputText value="#{teste.nome}" />
<h:outputLabel value="Senha:" />
<p:password value="#{teste.apelido}" />
</h:panelGrid>
<h:panelGrid columns="2" style="margin-left:auto;margin-right:auto;">
<p:commandButton type="submit" id="login" value="Entrar"
action="#{teste.imprimir}" />
<p:commandButton id="clear" value="Limpar Campos" />
</h:panelGrid>
</p:panel>
</p:layoutUnit>
</h:form>
</h:body>
</html>
Segue a classe bean:
package com.estudo.teste.jdbc;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
@ManagedBean
@ViewScoped
public class teste {
private String nome;
private String apelido;
public void imprimir(){
System.out.println(nome+" - "+apelido);
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getApelido() {
return apelido;
}
public void setApelido(String apelido) {
this.apelido = apelido;
}
}
Bom agradeço desde já..