0

I have a form to update user's information, if validation fails, it displays error message and after correcting the error input, the form doesn't get submit why?. Without error message, it submits well.

<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>
4

1 回答 1

0

为什么显示警报消息后表单没有提交:如果值为空,我需要什么 id 设置默认值并提交表单。

于 2011-04-18T15:36:58.513 回答