modalPanel关闭后,a4j:commandLink的操作未触发

时间:2019-05-29 07:19:19

标签: jsf jsf-1.1

我想在单击命令链接后调用该操作,然后选择“确定”以确认并在命令链接中触发该操作。但是我只能打开一个modalPanel并关闭它。但是不会在a4j:commandLink中调用该动作。请问在选择modalPanel的“确定”后如何触发该动作?

<a4j:commandLink
     action="#{confManager.deleteValue(deleteValue)}"
     onclick="#{rich:component('confirmation')}.show();return false"
     value="#{messages.deleteLabel}"
     title="#{messages.deleteHint}"
     propagation="none"
     reRender="systemPropertiesTable">
</a4j:commandLink>

<rich:modalPanel id="confirmation" width="210" height="100">
    <f:facet name="header">#{messages.systemPropertyConfirmDialogHeader} 
    </f:facet>
          <h:panelGrid>
            <h:panelGrid columns="2">
              <p><h:outputText value="#{messages.systemPropertyConfirmDialogContent}" /></p>
            </h:panelGrid>
            <h:panelGroup>
              <input type="button" value="OK"
                     onclick="#{rich:component('confirmation')}.hide();submit();return false" />
              <input type="button" value="Cancel"
                     onclick="#{rich:component('confirmation')}.hide();return false" />
        </h:panelGroup>
    </h:panelGrid>
</rich:modalPanel>

1 个答案:

答案 0 :(得分:0)

您尝试将“确定”按钮转换为a4j:commandButton并移动“确定”按钮上的操作吗?

您可以使用actionListener将“ deleteValue”保存在bean中,如果用户单击“确定”,则可以有效地删除它。