Spring WebFlow2 JavaScript가 페이지를 제출하지 않으십니까?Spring WebFlow2 JavaScript가 페이지를 제출하지 않으십니까?
사용자가 라디오 버튼 중 하나를 클릭하면 전환 값으로 내 페이지를 제출하기 위해 WebFlow2와 함께 제공되는 Spring JavaScript를 사용하려고합니다. 내 자바 스크립트를 삽입했지만 페이지가 클릭에 제출되지 않습니다?
JSP :
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<html>
<head>
<title>Spring 3.0 MVC - Web Flow Example</title>
<script type="text/javascript"
src="<c:url value="/resources/dojo/dojo.js" />">
</script>
<script type="text/javascript"
src="<c:url value="/resources/spring/Spring.js" />">
</script>
<script type="text/javascript"
src="<c:url value="/resources/spring/Spring-Dojo.js" />">
</script>
<link type="text/css" rel="stylesheet"
href="<c:url value="/resources/dijit/themes/tundra/tundra.css" />" />
</head>
<body>
<h2>Customer Registration</h2>
<form:form commandName="customer" id="customer">
<input type="hidden" name="_flowExecutionKey"
value="${flowExecutionKey}" />
<table>
<tr>
<td><font color=red><form:errors path="name" /></font><b>Name:
</b></td>
<td><form:input path="name" id="name" /> <script
type="text/javascript">
Spring
.addDecoration(new Spring.ElementDecoration(
{
elementId : "name",
widgetType : "dijit.form.ValidationTextBox",
widgetAttrs : {
promptMessage : "This is the name you would like entered into the system."
}
}));
</script> <br />
<p></td>
</tr>
<tr>
<td><font color=red><form:errors path="phoneNumber" /></font>
<b>Phone number: </b></td>
<td><form:input path="phoneNumber" id="phoneNumber" /><br />
<script type="text/javascript">
Spring
.addDecoration(new Spring.ElementDecoration(
{
elementId : "phoneNumber",
widgetType : "dijit.form.ValidationTextBox",
widgetAttrs : {
promptMessage : "This is the phone number for the above name"
}
}));
</script></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td><b>Row:</b></td>
<td><form:radiobutton value="B" path="row" id="row" />Row: B<BR>
<form:radiobutton value="A" path="row" id="row" />Row: A<BR>
<script type="text/javascript">
Spring.addDecoration(new Spring.AjaxEventDecoration({
elementId : "row",
formId : "customer",
event : "onChange",
params : {
_eventId : "loadSchools",
fragments : "body"
}
}));
</script></td>
</tr>
</table>
<input type="submit" name="_eventId_proceed" value="proceed"
id="proceed" />
<script type="text/javascript">
Spring.addDecoration(new Spring.ValidateAllDecoration({
elementId : 'proceed',
event : 'onclick'
}));
</script>
<input type="submit" name="_eventId_cancel" value="Cancel" />
</form:form>
</body>
</html>
덕분에 작동하지 않았다 그러나 나는 라디오를 사용하고 있습니다 버튼을 클릭하고 첫 번째 라디오 버튼 – PartyWithJohn
의 첫 번째 클릭 만 작동하는 것처럼 보입니다. 작동합니까? 당신은 onchange와 onclick을 모두 넣었습니까? 그리고 둘 다 장식 했나요? – rptmat57
NOOOO NOT WORKING .... 나는 onchange와 onclick을 둘 다 넣었고 첫 번째 라디오 버튼을 클릭하면 작동합니다 .... – PartyWithJohn