我在这里遇到了另一个奇怪的 JSF 问题...我真的不知道为什么,但是无论我尝试做什么,我都会遇到两个问题中的一个。我的 popupPanel 中的操作方法没有(意味着从不)被调用或被调用,但我的 selectBox 中的值(总是)为空。无法弄清楚问题是什么,但在我看来,就像 XHTML 属性问题一样。
已经尝试将 popupPanel 放在我的 h:form 之外(在其他一些位置帮助了我......),我也尝试将它放在外面并将另一个表单放入我的弹出窗口中。除此之外,我试图将附件更改为父/表单,并且我将弹出窗口中 commandButton 的执行更改为 form/form-id/popuppanel-id,我想我做了更多的事情......但没有任何帮助. Bean 是会话范围的,如果它确实很重要,我正在使用 Richface 4.0 Final。
不管怎样,XHTML 看起来像这样:
    <rich:popupPanel
  header="#{label['edit.title']} #{mandateAction.ccService.mandateList[mandateAction.currentIndex].id}"
  id="addExternalSystem"
  onmaskclick="#{rich:component('addExternalSystem')}.hide()"
  domElementAttachment="form" autosized="true" layout="block">
    <h:panelGrid columns="2">
      <h:outputText value="#{label['login.username']}" />
      <h:inputText
        value="#{mandateAction.newExternalSystem.username}" />
      <h:outputText value="#{label['login.password']}" />
      <h:inputSecret
        value="#{mandateAction.newExternalSystem.password}" />
      <h:outputText value="#{label['mandate.externalSystem']}" />
      <h:selectOneMenu
        value="#{mandateAction.newExternalSystem.externalSystem}">
        <f:selectItems
          value="#{creditcardConfigurationService.externalSystems}"
          itemLabel="#{system.name}" itemValue="#{system}"
          var="system" />
        <f:converter binding="#{externalSystemConverter}" />
      </h:selectOneMenu>
      ....
                <a4j:commandButton value="#{label['insert.save']}"
        action="#{mandateAction.insertNewSystem}"
        render="mandate_table" execute="@form"
        oncomplete="if (#{facesContext.maximumSeverity==null}) {#{rich:component('addExternalSystem')}.hide();}" />