1 Reply Latest reply on Jan 28, 2009 2:18 AM by Milind S

    Problem with rich:extendedDataTable on Modal Panel

    Milind S Newbie

      Hi,
      I am facing a proble when I use rich:extendedDataTable on Modal Panel. The problem is when modal panel is shown, I want to reRender the extendedDataTable. However when I re-render the modal panel on showing, it is not getting dispalyed. If I do not re-render it is getting displayed but the datatable is blank.


      Could someone help me?


      Thanks and regards,
      Milind

        • 1. Re: Problem with rich:extendedDataTable on Modal Panel
          Milind S Newbie

          Here is the code.



          1. main.xhtml - In main.xhtml, there is a button "Show Panel"
          <a4j:commandButton id="showPanel" value="Show Panel" style="position:absolute; left:180px; top:150px; height:23px;" action="#{bean.testAction}" oncomplete="Richfaces.showModalPanel('ModalPanel2',{width:1000, height:600});" reRender="HeaderDetails">
                      </a4j:commandButton>
          




          2. Modal panel code which is part of main.xhtml



          <rich:modalPanel id="ModalPanel2" height="600" width="970">
               <f:facet name="header">
                    <h:outputText value="Test Panel" />
               </f:facet>
               
               <f:facet name="controls">
                    <span style="cursor: pointer"
                         onclick="javascript:Richfaces.hideModalPanel('ModalPanel2')">X</span>
               </f:facet>
               <rich:panel id="HeaderDetails">
                    <ui:include src="HeaderData.xhtml" />
               </rich:panel>
               <rich:panel id="RowList">
                         <ui:include src="DataList.xhtml" />
               </rich:panel>
          </rich:modalPanel>




          3. DataList.xhtml



          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                                "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <f:view contentType="text/html"
                  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:a="http://richfaces.org/a4j"
                   xmlns:rich="http://richfaces.org/rich"
                  xmlns:s="http://jboss.com/products/seam/taglib">
          <html>
          <head>
              <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
              <title>AAAA</title>
              <link rel="shortcut icon" href="#{request.contextPath}/favicon.ico"/>
              <a:loadStyle src="resource:///stylesheet/theme.xcss"/>
              <a:loadStyle src="/stylesheet/theme.css"/>
              <ui:insert name="head"/>
          </head>
          <body>
               <div>     
               <rich:panel id="SchedChTbl">
                    <h:form id="Event" styleClass="edit">
          
                    <f:facet name="header">Event Search Results</f:facet>
                   <h:outputText value="The Event search returned no results." style="font-weight:bold"
                         rendered="#{empty EventList.retrieveEventlist()}"/>
               
                    <rich:extendedDataTable height="400px" rendered="#{not empty bean.retrieveEventlist()}"
                          width="950px" 
                          value="#{bean.retrieveEventlist()}" var="sch">
                          <rich:column id="schedtime" size="120" sortable="true" sortBy="#{sch.schedTime}" filterBy="#{sch.schedTime}" filterEvent="onkeyup" label="SCHED_TIME">
                              <f:facet name="header"><h:outputText styleClass="headerText" value="SCHED_TIME" /></f:facet>
                              <h:outputText value="#{sch.schedTime}" />
                          </rich:column>
                          <rich:column id="materialid" sortable="true" sortBy="#{sch.materialId}" filterBy="#{sch.materialId}" filterEvent="onkeyup" label="MATERIAL_ID">
                              <f:facet name="header"><h:outputText styleClass="headerText" value="MATERIAL_ID" /></f:facet>
                              <h:outputText value="#{sch.materialId}" />
                          </rich:column>
                          <rich:column id="titleid" size="100" sortable="true" sortBy="#{sch.title}" filterBy="#{sch.title}" filterEvent="onkeyup" label="TITLE">
                              <f:facet name="header"><h:outputText styleClass="headerText" value="TITLE" /></f:facet>
                              <h:outputText value="#{sch.title}" />
                          </rich:column>                
                          <rich:column width="100px" id="trafficid" sortable="true" sortBy="#{sch.trafficId}" filterBy="#{sch.trafficId}" filterEvent="onkeyup" label="TRAFFIC_ID">
                              <f:facet name="header"><h:outputText styleClass="headerText" value="TRAFFIC_ID" /></f:facet>
                              <h:outputText value="#{sch.trafficId}" />
                          </rich:column>
                          
                  </rich:extendedDataTable>
                  
                   </h:form>
             
             </rich:panel>
                   
          </div>
          </body>
          </html>
          </f:view>