我在使用 Spring.AjaxEventDecoration 和 dijit.form.Select 时遇到问题,如果用户以某种方式从选择框中选择性别类型,我在 bean 中获取的 elementID 是 Spring MVC?下面是我的表格:
<form:select path="sex">
<form:option value="MALE" label="MALE" />
<form:option value="FEMALE" label="FEMALE" />
</form:select>
<script type="text/javascript">
Spring.addDecoration(new Spring.ElementDecoration({
elementId : "sex",
widgetType : "dijit.form.Select",
widgetAttrs : {
promptMessage : "Enter Sex",
required : true }}));
Spring.addDecoration(new Spring.AjaxEventDecoration({
elementId: "sex",
event: "onChange",
formId:"customer",
params: {fragments:"body", _eventId: "loadSchools"}}));
</script>