6 Replies Latest reply on Apr 7, 2009 4:31 PM by Chris Mathrusse

    rich:modalPanel not populating with data in IE7

    Chris Mathrusse Newbie

      I've defined a rich:modalPanel, following the documentation carefully, and all seems to work well, except that it does not populate with data from my backing bean. I've got the following:

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich"
       template="../layout/layout.xhtml">
      
       <ui:param name="pageTitle" value="#{msgs.orgsTitle}" />
      
       <ui:define name="main-frame">
       <h:form>
       <h:panelGrid>
      
       <rich:dataTable id="orgsTable" binding="#{organization.table}"
       value="#{organization.organizations}"
       var="record"
       onRowMouseOver="this.style.backgroundColor='#F1F1F1';this.style.cursor='pointer';"
       onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'"
       cellpadding="0" cellspacing="0" border="0" rows="15" reRender="ds"
       style="width: 100%; table-layout: fixed;">
      ....
      
       <rich:column>
       <a4j:commandButton value="Edit" oncomplete="#{rich:component('organizationEdit')}.show()"
       reRender="organizationInfo, nameInput, descInput">
       <f:setPropertyActionListener value="#{record}" target="#{organization.selected}" />
       </a4j:commandButton>
       </rich:column>
      ...
       </rich:dataTable>
       </h:panelGrid>
       </h:form>
      
       <rich:modalPanel id="organizationEdit">
       <f:facet name="header">
       Organization
       </f:facet>
       <h:form>
       <h:panelGrid id="organizationInfo">
       <h:outputLabel for="nameInput" value="Name:"/>
       <h:inputText id="nameInput" value="#{organization.selected.id}"/>
       <h:outputLabel for="descInput" value="Description:"/>
       <h:inputText id="descInput" value="#{organization.selected.description}"/>
       <h:panelGrid columns="2">
       <a href="#" onclick="#{rich:component('organizationEdit')}.hide();return false">
       Close
       </a>
       <a4j:commandLink oncomplete="#{rich:component('organizationEdit')}.hide();return false">
       Save
       </a4j:commandLink>
       </h:panelGrid>
       </h:panelGrid>
       </h:form>
       </rich:modalPanel>
      
      
       </ui:define>
      </ui:composition>
      


      My <ui:composition> is part of an overall layout that is defined as follows:
      <html xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       xmlns:f="http://java.sun.com/jsf/core"
       xmlns:h="http://java.sun.com/jsf/html"
       xmlns:a4j="http://richfaces.org/a4j"
       xmlns:rich="http://richfaces.org/rich" >
       <f:view>
       <h:form>
       <a4j:region id="layoutRegion">
      ....
       <ui:insert name="main-frame"/>
       </a4j:region>
       </h:form>
       </f:view>
      </html
      


      The model opens when I select the edit link in the datatable, but the <h:inputText> fields are not populated with data from the backing bean. I find the backing bean's selected object being set but it appears the selected object is never being retrieved from the modalPanel, even though the link is defined to reRender the input fields.

      I've tried this in both IE7 and in Firefox and it appears to work correctly in FireFox as the inputText fields are being populated, but IE7 doesn't see to like it.

      Am I using this component correctly? If not, where is my mistake or is this an "Undocumented Feature" of IE? How can I get around this issue?

      Thanks for the help...