1 Reply Latest reply on Feb 14, 2011 7:32 AM by Ilya Sorokoumov

    Displaying data in a modal panel

    david hickman Newbie

      Hi

       

      I have a modal panel which includes several h:outputText items for static data and one h:inputText for editable data, the modal panel is being displayed by

       

      <a:commandButton value="Update" onclick="Richfaces.showModalPanel('updateSecurityAllocation', {height:'200px', width:'400px'});" action="#{securityBean.initialiseSecurityAllocation}"   />

       

      with the action attribute initailising the backing bean first.

       

      The problem is that when the modal panel is displayed no data is retrieved from the backing bean, the attribute getter methods are not being called, can anyone help please?

       

                   <h:form>

                       <r:modalPanel id="updateSecurityAllocation" >

                           <f:facet name="header">

                                   <h:outputText value="Update Security Allocation"/>

                           </f:facet>

       

                            <h:panelGrid columns="2" >

       

                                <h:outputLabel value="Facility ID: " for="updFacId" styleClass="default-label"/>

                              <h:outputText id="updFacId" value="#{securityBean.updFacId}" />

       

                                <h:outputLabel value="Facility Type: " for="updFacType" styleClass="default-label"/>

                              <h:outputText id="updFacType" value="#{securityBean.updFacType}" />

       

                                <h:outputLabel value="Limit Amount: " for="updFacLimitAmount" styleClass="default-label"/>

                              <h:outputText id="updFacLimitAmount" value="#{securityBean.updFacLimitAmount}" />

       

                                <h:outputLabel value="Limit Currency: " for="updFacCurrency" styleClass="default-label"/>

                              <h:outputText id="updFacCurrency" value="#{securityBean.updFacCurrency}" />

       

                                <h:outputLabel value="Allocated Amount: " for="updAllocAmount" styleClass="default-label"/>

                              <h:inputText id="updAllocAmount" value="#{securityBean.updAllocAmount}" styleClass="default-input" size="32"/>

       

                            </h:panelGrid>

                           <r:spacer height="10px"/>

                          <r:toolBar>

                              <r:toolBarGroup location="left">

                                  <a:commandButton value="Update" action="#{securityBean.updateSecurityAllocation}"

                                                                  reRender="securityDetailPanel,securityAllocationPanel"

                                                                  onclick="Richfaces.hideModalPanel('updateSecurityAllocation')"/>

                              </r:toolBarGroup>

                              <r:toolBarGroup location="right">

                                  <a:commandButton value="Cancel" onclick="Richfaces.hideModalPanel('updateSecurityAllocation')"/>

                              </r:toolBarGroup>

                          </r:toolBar>

                       </r:modalPanel>

                   </h:form>