2011-04-18 34 views
0

我有一个表单来更新用户的信息,如果验证失败,它会显示错误消息,并在纠正错误输入后,表单不会提交为什么?没有错误信息,它提交得很好。为什么表单在验证错误消息后未被提交?

<h:form id="update" prependId="false"> 
    <h:outputText value="Name: " styleClass="titleBlue"/> 
    <h:inputText id="contactName" value="#{serviceBean.contactName}" maxlength="50" size="15" style="width:200px" > 
     <f:validateLength minimum="3" maximum="50"/>    
    </h:inputText>    
    <h:message for="contactName" style="color:red;font-size: 0.70em;"/> 
    <h:outputText value="Title: " styleClass="titleBlue"/> 
    <h:inputText id="contactTitle" value="#{serviceBean.contactTitle}" maxlength="50" size="15" style="width:200px"> 
     <f:validateLength minimum="3" maximum="50"/> 
    </h:inputText> 
    <h:message for="contactTitle" style="color:red;font-size: 0.70em;"/> 
    <h:panelGroup style="display:block; text-align:center"> 
     <a4j:commandButton action="#{serviceBean.update}" styleClass="titleBold" value="Update"/> 
    </h:panelGroup> 
</h:form> 
+0

如果输入(导致验证错误)被纠正,表单是否正确提交? – 2011-04-18 15:11:29

+0

表单在输入更正后不会提交 – gkp 2011-04-18 15:14:08

+0

这不是说它应该如何工作?如果失败,请不要提交... – Niklas 2011-04-18 15:14:08

回答

0

为什么形式没有得到提交显示警告信息后: 我需要的id如果该值是空集的默认值,并提交表单。

+0

该值不为空 – gkp 2011-04-19 07:59:24

相关问题