我有一个复合组件供用户确认删除操作。但问题是当用户单击“是”时,程序会尝试在我的表单中验证其他输入字段。我认为立即属性不起作用。如何跳过表单中的其他输入字段?
我的观点;
<h:form>
<p:commandButton id="myButtonId" onclick="deleteDialog.show();" icon="ui-icon-trash" title="Delete"/>
//someinputfields and validators
<bzn:deleteConfirmDialog actionListener="#{addressBookController.deleteParty()}">
</bzn:deleteConfirmDialog>
</h:form>
这是我的复合组件;
<composite:interface>
<composite:attribute name="actionListener"
method-signature="java.lang.String action()" />
</composite:interface>
<composite:implementation>
<p:dialog id="deleteDialogId"
widgetVar="deleteDialog"
resizable="false"
height="100"
width="250"
>
<p:outputPanel>
<center>
<p:commandButton value="Yes" immediate="true"
actionListener="#{cc.attrs.actionListener}"
oncomplete="deleteDialog.hide();"/>
<p:commandButton value="No" oncomplete="deleteDialog.hide();"/>
</center>
</p:outputPanel>
</p:dialog>
</composite:implementation>