在我的应用程序中,我将 a<p:panel>放在了<h:form>. 现在在这个面板中我有一些<p:inputText>,在面板的末尾我有两个按钮,一个是Submit另一个
Reset。Reset如果在提交表单之前按下按钮,它会正常工作。但是,如果一旦我提交form并且某些文本字段无法验证,则该字段包含以前输入的数据。现在,如果我按下Reset按钮清除所有字段,则它不起作用。
我Reset的按钮代码:
<p:commandButton value="#{Bundle['resetButton']}" process="@this" update="addCustomerPanel" immediate="true" />
形式如下:
<h:form id="customerForm">
<p:panel id="addCustomerPanel">
.......text fields and two buttons placed here
</p:panel>
<h:form>
更新reset我已经通过单击按钮
导航到同一页面解决了这个问题。