Ver Mensaje Individual
  #1 (permalink)  
Antiguo 06/07/2016, 12:20
daicon
 
Fecha de Ingreso: julio-2010
Mensajes: 134
Antigüedad: 13 años, 9 meses
Puntos: 0
Spring Flow en un formulario POST

Hola shurs,

Tengo el siguiente codigo:

Este es mi archivo flow:
Código:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">

    <var name="controller" class="org.xxx.flowController.Statistics" />
    <var name="utils" class="org.xxx.flowController.Utils" />
   
    <var name="assess" class="org.xxx.model.Assess" />
    
    <on-start>
        <set name="flowScope.id" value="requestParameters.id" type="int" />
    </on-start>
    
    <view-state id="statistic1" view="detalleReport/index" model="controller">
        <binder>
            <binding property="indicators" />
        </binder>
        <on-render>
            <evaluate expression="utils.getReport(flowScope.id)" result="flowScope.report" />
            <evaluate expression="utils.getOrganizationOfReport(flowScope.id)" result="flowScope.organization" />
            <evaluate expression="utils.getReviewOrganization(messageContext,currentUser.name)" result="flowScope.review"/>
            <evaluate expression="controller.loadNumericIndicators(messageContext,1)" result="flowScope.numericIndicators"/>
        </on-render>
        <transition on="submit" to="statistic1" validate="false" >
            <evaluate expression="controller.getService1(messageContext,1)" result="flowScope.dataList" />
        </transition>
        <transition on="submitfinal" to="statistic1" >
            <evaluate expression="assess.guardar(messageContext)" />
        </transition>
        
        
    </view-state>
    
 
    <end-state id="fail" view="externalRedirect:/dashboardClient"/>
</flow>
Código:
public class Assess implements Serializable {
     private String valoracionS1;
    private String valoracionS2;
    private String valoracionS3;
    private String valoracionS4;
    private String valoracionGlobal;
    
    
    static final String JDBC_DRIVER = "com.mysql.jdbc.Driver";
    static final String DB_URL = "jdbc:mysql://localhost:3306/xxxx";
    
    static final String USER = "root";
   static final String PASS = "root";
   

    
    public Assess() {
    }

    public String getValoracionS1() {
        return valoracionS1;
    }

    public void setValoracionS1(String valoracionS1) {
        this.valoracionS1 = valoracionS1;
    }

    public String getValoracionS2() {
        return valoracionS2;
    }

    public void setValoracionS2(String valoracionS2) {
        this.valoracionS2 = valoracionS2;
    }

    public String getValoracionS3() {
        return valoracionS3;
    }

    public void setValoracionS3(String valoracionS3) {
        this.valoracionS3 = valoracionS3;
    }

    public String getValoracionS4() {
        return valoracionS4;
    }

    public void setValoracionS4(String valoracionS4) {
        this.valoracionS4 = valoracionS4;
    }

    public String getValoracionGlobal() {
        return valoracionGlobal;
    }

    public void setValoracionGlobal(String valoracionGlobal) {
        this.valoracionGlobal = valoracionGlobal;
    }
    
    
    @Transactional
    public void guardar(MessageContext messages){
                
        String aux = this.valoracionS4;
        System.out.println(aux);
}
}
Y este mi jspx:

Código:
<div xmlns:spring="http://www.springframework.org/tags" xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:util="urn:jsptagdir:/WEB-INF/tags/util" xmlns:form="http://www.springframework.org/tags/form" xmlns:jsp="http://java.sun.com/JSP/Page" class="row">
    <jsp:directive.page contentType="text/html;charset=UTF-8" />
    <jsp:output omit-xml-declaration="yes" />
    <spring:message var="title" code="webflow_creaReportsAdmin_title" htmlEscape="false" />

   
    <form:form modelAttribute="Assess" method="post">
    <div class="span9">            
        <h2>Valoración del auditor</h2>
        <input type="text" name="valoracionS4" value="${assess.valoracionS4}" id="valoracionS4" required="true" class="span2"  />
        <form:errors path="${assess.valoracionS4}"/>
    </div>
                
    <div class="span9">            
        <h2 style="color:#028E01">Valoración global del auditor de los indicadores analizados </h2>
        <input type="text" name="valoracionGlobal" value="${assess.valoracionGlobal}" id="valoracionGlobal" required="true" class="span2"  />
        <form:errors path="${assess.valoracionGlobal}"/>
    </div>
    
    
    <div class="row">
        <div class="pull-right">
            <spring:message var="proceed" code="button_next" htmlEscape="false" />
            <input type="submit" id="submitfinal" name="_eventId_submitfinal" value="${fn:escapeXml(proceed)}" class="btn btn-large btn-success span2" />
            
        </div>
    </div>
    </form:form>    
</div>
Bueno, pues mi problema es que no me llega ningun valor en los parametros "valoracionGlobal" y "valoracionS4".
De hecho pongo breakpoints en los setter y nunca entra
Sin embargo en los getters si que entra.

¿que me falta?

gracias