5 Replies Latest reply: May 23, 2012 5:41 AM by in the line of fire RSS

    Button action firing only once

    in the line of fire
      Experts,

      I have a dynamic region with 2 fragments. On one fragment i have 3 buttons , SAVE, UPDATE and CANCEL. On save i am doing some DB work. The issue is the action event fires only once for all buttons. I have to navigate to a diff fragment and come bk again for the event to fire again.
      <?xml version='1.0' encoding='UTF-8'?>
      <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
                xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
                xmlns:f="http://java.sun.com/jsf/core">
        <af:panelStretchLayout id="psl1" styleClass="AFStretchWidth">
          <f:facet name="center">
            <af:panelGroupLayout id="pgl1" layout="scroll"
                                 styleClass="AFStretchWidth">
              <af:panelBox text="Profile" id="pb1" showDisclosure="false">
                <f:facet name="toolbar">
                  <af:toolbar id="t1">
                    <af:commandToolbarButton text="Update" id="ctbUpdate"
                                             actionListener="#{ProfileBean.toggleButton}"
                                             binding="#{ProfileBean.updateButton}"
                                             disabled="false"/>
                  </af:toolbar>
                </f:facet>
                <af:panelSplitter id="ps1" styleClass="AFStretchWidth"
                                  splitterPosition="600">
                  <f:facet name="first">
                      <af:panelBox id="pb2" showDisclosure="false">
                        <f:facet name="toolbar"/>
                        <af:panelFormLayout id="pfl1">
                          <af:panelLabelAndMessage label="#{bindings.PartyName.hints.label}"
                                                   id="plam12">
                            <af:outputText value="#{bindings.PartyName.inputValue}"
                                           id="ot13"/>
                          </af:panelLabelAndMessage>
                          <af:panelLabelAndMessage label="#{bindings.Dob.hints.label}"
                                                   id="plam10">
                            <af:outputText value="#{bindings.Dob.inputValue}"
                                           id="ot4"/>
                          </af:panelLabelAndMessage>
                          <af:panelLabelAndMessage label="#{bindings.Nationality.hints.label}"
                                                   id="plam7">
                            <af:outputText value="#{bindings.Nationality.inputValue}"
                                           id="ot7"/>
                          </af:panelLabelAndMessage>
                          <af:panelLabelAndMessage label="#{bindings.Gender.hints.label}"
                                                   id="plam1">
                            <af:outputText value="#{bindings.Gender.inputValue}"
                                           id="ot3"/>
                          </af:panelLabelAndMessage>
                          <af:panelLabelAndMessage label="#{bindings.PrimaryPhoneCountryCode.hints.label}"
                                                   id="plam2">
                            <af:outputText value="#{bindings.PrimaryPhoneCountryCode.inputValue}"
                                           id="ot8"/>
                          </af:panelLabelAndMessage>
                          <af:panelLabelAndMessage label="#{bindings.PrimaryPhoneAreaCode.hints.label}"
                                                   id="plam5">
                            <af:outputText value="#{bindings.PrimaryPhoneAreaCode.inputValue}"
                                           id="ot9"/>
                          </af:panelLabelAndMessage>
                          <af:panelLabelAndMessage label="#{bindings.PrimaryPhoneNumber.hints.label}"
                                                   id="plam9">
                            <af:outputText value="#{bindings.PrimaryPhoneNumber.inputValue}"
                                           id="ot10"/>
                          </af:panelLabelAndMessage>
                          <af:panelLabelAndMessage label="#{bindings.EmailAddress.hints.label}"
                                                   id="plam6">
                            <af:outputText value="#{bindings.EmailAddress.inputValue}"
                                           id="ot5"/>
                          </af:panelLabelAndMessage>
                          <af:panelLabelAndMessage label="#{bindings.Address1.hints.label}"
                                                   id="plam3">
                            <af:outputText value="#{bindings.Address1.inputValue}"
                                           id="ot6"/>
                          </af:panelLabelAndMessage>
                          <af:panelLabelAndMessage label="#{bindings.PostalCode.hints.label}"
                                                   id="plam4">
                            <af:outputText value="#{bindings.PostalCode.inputValue}"
                                           id="ot1"/>
                          </af:panelLabelAndMessage>
                          <af:panelLabelAndMessage label="#{bindings.City.hints.label}"
                                                   id="plam11">
                            <af:outputText value="#{bindings.City.inputValue}"
                                           id="ot11"/>
                          </af:panelLabelAndMessage>
                          <af:panelLabelAndMessage label="#{bindings.State.hints.label}"
                                                   id="plam8">
                            <af:outputText value="#{bindings.State.inputValue}"
                                           id="ot12"/>
                          </af:panelLabelAndMessage>
                          <af:panelLabelAndMessage label="#{bindings.Country.hints.label}"
                                                   id="plam13">
                            <af:outputText value="#{bindings.Country.inputValue}"
                                           id="ot2"/>
                          </af:panelLabelAndMessage>
                        </af:panelFormLayout>
                      </af:panelBox>
                  </f:facet>
                  <f:facet name="second">
                      <af:panelBox id="pb3" showDisclosure="false">
                        <f:facet name="toolbar">
                        <af:toolbar id="t2">
                          <af:commandToolbarButton text="Save"
                                                   id="ctb1"
                                                   actionListener="#{ProfileBean.updateCustomer}"
                                                   actionDelivery="none"/>
                          <af:commandToolbarButton text="Close"
                                                   id="ctbClose"
                                                   binding="#{ProfileBean.closeButton}"
                                                   actionListener="#{ProfileBean.toggleButton}"/>
                        </af:toolbar>
                      </f:facet>
                      <af:panelFormLayout id="pfl2">
                        <af:inputText value="#{bindings.PartyName1.inputValue}"
                                      label="#{bindings.PartyName1.hints.label}"
                                      required="#{bindings.PartyName1.hints.mandatory}"
                                      columns="#{bindings.PartyName1.hints.displayWidth}"
                                      maximumLength="#{bindings.PartyName1.hints.precision}"
                                      shortDesc="#{bindings.PartyName1.hints.tooltip}"
                                      id="it10">
                          <f:validator binding="#{bindings.PartyName1.validator}"/>
                        </af:inputText>
                        <af:inputText value="#{bindings.Dob1.inputValue}"
                                      label="#{bindings.Dob1.hints.label}"
                                      required="#{bindings.Dob1.hints.mandatory}"
                                      columns="#{bindings.Dob1.hints.displayWidth}"
                                      maximumLength="#{bindings.Dob1.hints.precision}"
                                      shortDesc="#{bindings.Dob1.hints.tooltip}"
                                      id="it1">
                          <f:validator binding="#{bindings.Dob1.validator}"/>
                        </af:inputText>
                        <af:inputText value="#{bindings.Nationality1.inputValue}"
                                      label="#{bindings.Nationality1.hints.label}"
                                      required="#{bindings.Nationality1.hints.mandatory}"
                                      columns="#{bindings.Nationality1.hints.displayWidth}"
                                      maximumLength="#{bindings.Nationality1.hints.precision}"
                                      shortDesc="#{bindings.Nationality1.hints.tooltip}"
                                      id="it6">
                          <f:validator binding="#{bindings.Nationality1.validator}"/>
                        </af:inputText>
                        <af:inputText value="#{bindings.Gender1.inputValue}"
                                      label="#{bindings.Gender1.hints.label}"
                                      required="#{bindings.Gender1.hints.mandatory}"
                                      columns="#{bindings.Gender1.hints.displayWidth}"
                                      maximumLength="#{bindings.Gender1.hints.precision}"
                                      shortDesc="#{bindings.Gender1.hints.tooltip}"
                                      id="it8">
                          <f:validator binding="#{bindings.Gender1.validator}"/>
                        </af:inputText>
                        <af:inputText value="#{bindings.PrimaryPhoneCountryCode1.inputValue}"
                                      label="#{bindings.PrimaryPhoneCountryCode1.hints.label}"
                                      required="#{bindings.PrimaryPhoneCountryCode1.hints.mandatory}"
                                      columns="#{bindings.PrimaryPhoneCountryCode1.hints.displayWidth}"
                                      maximumLength="#{bindings.PrimaryPhoneCountryCode1.hints.precision}"
                                      shortDesc="#{bindings.PrimaryPhoneCountryCode1.hints.tooltip}"
                                      id="it5">
                          <f:validator binding="#{bindings.PrimaryPhoneCountryCode1.validator}"/>
                        </af:inputText>
                        <af:inputText value="#{bindings.PrimaryPhoneAreaCode1.inputValue}"
                                      label="#{bindings.PrimaryPhoneAreaCode1.hints.label}"
                                      required="#{bindings.PrimaryPhoneAreaCode1.hints.mandatory}"
                                      columns="#{bindings.PrimaryPhoneAreaCode1.hints.displayWidth}"
                                      maximumLength="#{bindings.PrimaryPhoneAreaCode1.hints.precision}"
                                      shortDesc="#{bindings.PrimaryPhoneAreaCode1.hints.tooltip}"
                                      id="it12">
                          <f:validator binding="#{bindings.PrimaryPhoneAreaCode1.validator}"/>
                        </af:inputText>
                        <af:inputText value="#{bindings.PrimaryPhoneNumber1.inputValue}"
                                      label="#{bindings.PrimaryPhoneNumber1.hints.label}"
                                      required="#{bindings.PrimaryPhoneNumber1.hints.mandatory}"
                                      columns="#{bindings.PrimaryPhoneNumber1.hints.displayWidth}"
                                      maximumLength="#{bindings.PrimaryPhoneNumber1.hints.precision}"
                                      shortDesc="#{bindings.PrimaryPhoneNumber1.hints.tooltip}"
                                      id="it2">
                          <f:validator binding="#{bindings.PrimaryPhoneNumber1.validator}"/>
                        </af:inputText>
                        <af:inputText value="#{bindings.EmailAddress1.inputValue}"
                                      label="#{bindings.EmailAddress1.hints.label}"
                                      required="#{bindings.EmailAddress1.hints.mandatory}"
                                      columns="#{bindings.EmailAddress1.hints.displayWidth}"
                                      maximumLength="#{bindings.EmailAddress1.hints.precision}"
                                      shortDesc="#{bindings.EmailAddress1.hints.tooltip}"
                                      id="it3">
                          <f:validator binding="#{bindings.EmailAddress1.validator}"/>
                        </af:inputText>
                        <af:inputText value="#{bindings.Address11.inputValue}"
                                      label="#{bindings.Address11.hints.label}"
                                      required="#{bindings.Address11.hints.mandatory}"
                                      columns="#{bindings.Address11.hints.displayWidth}"
                                      maximumLength="#{bindings.Address11.hints.precision}"
                                      shortDesc="#{bindings.Address11.hints.tooltip}"
                                      id="it11">
                          <f:validator binding="#{bindings.Address11.validator}"/>
                        </af:inputText>
                        <af:inputText value="#{bindings.PostalCode1.inputValue}"
                                      label="#{bindings.PostalCode1.hints.label}"
                                      required="#{bindings.PostalCode1.hints.mandatory}"
                                      columns="#{bindings.PostalCode1.hints.displayWidth}"
                                      maximumLength="#{bindings.PostalCode1.hints.precision}"
                                      shortDesc="#{bindings.PostalCode1.hints.tooltip}"
                                      id="it4">
                          <f:validator binding="#{bindings.PostalCode1.validator}"/>
                        </af:inputText>
                        <af:inputText value="#{bindings.City1.inputValue}"
                                      label="#{bindings.City1.hints.label}"
                                      required="#{bindings.City1.hints.mandatory}"
                                      columns="#{bindings.City1.hints.displayWidth}"
                                      maximumLength="#{bindings.City1.hints.precision}"
                                      shortDesc="#{bindings.City1.hints.tooltip}"
                                      id="it9">
                          <f:validator binding="#{bindings.City1.validator}"/>
                        </af:inputText>
                        <af:inputText value="#{bindings.State1.inputValue}"
                                      label="#{bindings.State1.hints.label}"
                                      required="#{bindings.State1.hints.mandatory}"
                                      columns="#{bindings.State1.hints.displayWidth}"
                                      maximumLength="#{bindings.State1.hints.precision}"
                                      shortDesc="#{bindings.State1.hints.tooltip}"
                                      id="it7">
                          <f:validator binding="#{bindings.State1.validator}"/>
                        </af:inputText>
                        <af:inputText value="#{bindings.Country1.inputValue}"
                                      label="#{bindings.Country1.hints.label}"
                                      required="#{bindings.Country1.hints.mandatory}"
                                      columns="#{bindings.Country1.hints.displayWidth}"
                                      maximumLength="#{bindings.Country1.hints.precision}"
                                      shortDesc="#{bindings.Country1.hints.tooltip}"
                                      id="it13">
                          <f:validator binding="#{bindings.Country1.validator}"/>
                        </af:inputText>
                      </af:panelFormLayout>
                    </af:panelBox>
                  </f:facet>
                </af:panelSplitter>
              </af:panelBox>
            </af:panelGroupLayout>
          </f:facet>
        </af:panelStretchLayout>
      </jsp:root>
      Jdev 11.1.5