如何在spring dojo中验证select

时间:2013-03-26 13:40:55

标签: spring dojo spring-webflow

我有一个带有下拉列表的表单,其中应用了dojo装饰。当我在下拉列表中没有选择任何内容的情况下提交表单时,我没有得到任何警告或要求提交表单的消息。请建议我需要做什么。

<form:form id="payment"  method="post" modelAttribute="registration">
 <label for="proofId">Proof Type:</label> 
    <form:select path="proofId" style="width:110px;" id="proof" name="proofId">
    <form:option value="-1">Select</form:option>
    <form:options items="${typeofproof}" itemValue="proofId" itemLabel="proofType"/>
    </form:select>  
    </li><br />

Spring.addDecoration(new Spring.ElementDecoration({
 elementId : "proof",
 widgetType : "dijit.form.FilteringSelect",
 widgetAttrs : {
        promptMessage : "Select Proof Type",
        required : true,       
    }
}));
<button type="submit" id="submit" name="_eventId_createRegistration">Register Me</button>
Spring.addDecoration(new Spring.ValidateAllDecoration(
     {
         elementId : 'submit',
         event:'onclick' 
     }));
 </form:form>

0 个答案:

没有答案