2012-06-29 9 views
0

스프링 웹 플로우를 사용하고 있지만 제출 버튼을 클릭해도 아무런 변화가 없습니다. 오류가없고 예외도없고 같은 페이지로 리디렉션됩니다. 여기 내 코드입니다 :스프링 웹 플로우 do nothing do

ConsultarControlOrdenAcunacionFlow.xml :

<view-state id="ConsultarControlOrdenAcunacion" model="ordenesAcunacionParaAutorizar"> 
    <binder> 
     <binding property="ordenIds" required="true"></binding>    
     <binding property="comentario" required="true"></binding>    
    </binder>   
    <transition on="firmarOrdenes" to="GetDatosParaFirma" validate="false"/> 
</view-state> 

ConsultarControlOrdenAcunacion.jsp :

<form:form id="formaAplicaAccion" modelAttribute="ordenesAcunacionParaAutorizar" action="${flowExecutionUrl}" method="POST" > 
     <form:input path="ordenIds" id="ordenIds" type="hidden" name="ordenIds" value=""/> 
     <form:input path="comentario" id="comentario" type="hidden" name="comentario" value="xxxxxxxxxxxxxxx"/> 
     <table cellpadding="0" cellspacing="0" border="1" class="display" id="ordenes1" style="font-size: 12px;" > 
     </table> 
     <input style="display:none;" id="botonAutorizar" type="submit" name="_eventId_firmarOrdenes" value="Firmar Datos"/> 
    </form:form> 

JQuery와 코드 :.

$ ("#의 formaAplicaAccion") (제출);

내가 뭘 잘못하고 있니?

감사합니다.

답변

0

제출 된 요청을 보려면 Firebug와 같은 플러그인을 사용해야합니다. 나는 Web Flow에게 어떤 전환이 걸릴지를 알려주는 JQuery form.submit() doesn't submit the button name_eventId_firmarOrdenes을 걸고있다.

두 가지 추가 팁 : 먼저 action=form:form 태그에는 필요 없습니다. 지금은 신뢰할 수있는 소스를 찾을 수 없지만 action=을 생략하면 WebFlow가 자동으로 올바른 작업 값을 제공합니다.

둘째, nameis not a valid attributeform:input입니다. 또한 일반적으로 form:input 대신 form:hidden을 사용하려고합니다 (유효한 속성에 대해서는 동일한 링크 참조).

2

동일한 문제가있었습니다. 단추 이름과 동일한 이름을 가진 숨겨진 요소를 추가하여 문제를 해결했습니다. 이것은 나를 위해 작동합니다.