JSP + Action

4 respostas
L

Olá pessoal, boa tarde a todos.

Gostaria de saber se alguém poderia me ajudar?
Com relação ao comando h:commandButton estou chamando pelo action um método, mas este não esta executando.

Obrigado,

Lestat.

4 Respostas

CintiaDR

Posta o faces-config, o action e o commandButton

L
<?xml version='1.0' encoding='UTF-8'?>
<navigation-rule>                
    <from-view-id>/formularioDadosPessoais</from-view-id>
    <navigation-case>
        <from-outcome>PESSOAIS_OK_SUP_COMPL</from-outcome>
        <to-view-id>/formularioFormacaoEscolar.jsp</to-view-id>
    </navigation-case>            
    <navigation-case>
        <from-outcome>PESSOAIS_OK_NAO_SUP_COMPL</from-outcome>
        <to-view-id>/formularioDadosProfissionais.jsp</to-view-id>
    </navigation-case>
</navigation-rule>   

<managed-bean>
    <managed-bean-name>
        Curriculo
    </managed-bean-name>
    <managed-bean-class>
        Curriculo.ControleCurriculo
    </managed-bean-class>
    <managed-bean-scope>
        session
    </managed-bean-scope>
</managed-bean>

<%@taglib prefix=“f” uri=“http://java.sun.com/jsf/core”%>
<%@taglib prefix=“h” uri=“http://java.sun.com/jsf/html”%>

Currículo on-line

Dados Pessoais

<td>
                        <h:selectOneRadio id="sexo" value="#{Curriculo.sexo}" required="true">
                            <f:selectItem itemValue="M" itemLabel="Masculino"/>
                            <f:selectItem itemValue="F" itemLabel="Feminino"/>
                        </h:selectOneRadio>
                        <h:message for="sexo"  style="color:red"/>
                    </td>
                </tr>
                <tr>
                    <td>* Data de Nascimento (dd/mm/aaaa)</td>                        
                    <td>
                        <h:inputText id="dataNascimento" value="#{Curriculo.dataNascimento}" required="true">
                            <f:convertDateTime pattern="dd/mm/yyyy"/>
                        </h:inputText>
                        <h:message for="dataNascimento"  style="color:red"/>
                    </td>                        
                </tr>
                <tr>
                    <td>Naturalidade</td>                        
                    <td>
                        <h:inputText id="naturalidade" value="#{Curriculo.naturalidade}">
                            <f:validateLength minimum="3" maximum="80" />                                                                
                        </h:inputText>                            
                    </td>
                </tr>
                <tr>
                    <td>Estado Civil</td>
                    <td>
                        <h:selectOneMenu id="estadoCivil" value="#{Curriculo.estadoCivil}">
                            <f:selectItem itemValue="1" itemLabel="Solteiro(a)"/>
                            <f:selectItem itemValue="2" itemLabel="Casado(a)"/>
                            <f:selectItem itemValue="3" itemLabel="Viúvo(a)"/>
                            <f:selectItem itemValue="4" itemLabel="Divorciado(a)"/>
                        </h:selectOneMenu>                                                        
                    </td>                        
                </tr>
                <tr>
                    <td>* CPF (somente números)</td>                        
                    <td>
                        <h:inputText id="cpf" value="#{Curriculo.cpf}" required="true"                                
                        validator="#{Curriculo.validarCpf}"/>                             
                        <h:message for="cpf"  style="color:red"/>
                    </td>
                </tr>
                <tr>
                    <td>E-mail</td>                        
                    <td>
                        <h:inputText id="email" value="#{Curriculo.email}"
                        validator="#{Curriculo.validarEmail}"/>
                    </td>
                </tr>
                <tr>
                    <td>Grau Instrução</td>
                    <td>
                        <h:selectOneMenu id="grauInstrucao" value="#{Curriculo.grauInstrucao}">
                            <f:selectItem itemValue="1" itemLabel="1º Grau"/>
                            <f:selectItem itemValue="2" itemLabel="2º Grau"/>
                            <f:selectItem itemValue="3" itemLabel="Superior Incompleto"/>
                            <f:selectItem itemValue="4" itemLabel="Superior Completo"/>
                        </h:selectOneMenu>
                    </td>
                </tr>
                <tr>
                    <td>* - campos obrigatórios</td>
                </tr>
            </table>
            <p>
                <h:commandButton action="#{Curriculo.inserirDadosPessoais}" value="Continuar"/>
            </p>
        </h:form>
    </f:view>
</body></html>
* Nome Completo:
* Sexo
gleise

O container não está lançando nenhum log de erro ? Se estiver, posta aí. :wink:

L

Olá Gleise, boa tarde.

Infelizmente não há erro de retorno nenhum, isto é o que me deixa mais doido. :slight_smile:

Me diz uma coisa, vc posso te adicionar no meu yahoo messenger?

Para podermos conversar?

ahhh sim, e obrigado pela atenção e ajuda.

Lestat

Criado 8 de dezembro de 2007
Ultima resposta 8 de dez. de 2007
Respostas 4
Participantes 3