Question

i have another strange JSF problem here... I don´t really know why, but what ever i try to do, i have one out of two problems. Either the action method inside my popupPanel is not (means never) called or it is called, but the value from my selectBox is (always) null. Can´t figure out, what the problem is, but it seems to me, like it´s a XHTML property problem.

Already tried to put the popupPanel outside my h:form (helped me at some other locations...), i also tried to put it outside and put another form into my popup. Beyond that i was trying to change the attachment to parent/form and i changed the execute of the commandButton inside my popup to form/form-id/popuppanel-id and i guess there were some more things i did... but nothing helped. The Bean is session scoped and i am using Richface 4.0 Final if it does matter at all.

What ever, the XHTML looks like this:

    <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();}" />
Was it helpful?

Solution

If your page have any of the required fields kept as empty the submit from the popup panel will not work. In that case include the popup panel inside a form and domElementAttachment="form" , and perform the submit.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top