5 Replies Latest reply on Feb 4, 2009 9:01 AM by Nicklas Karlsson

    Excel generation

    Ramanuja Reddy Newbie

      my code is here,


      
               <h:selectOneMenu id="projects" value="#{canalsData.project}" style="width:44mm;">
                                              <f:selectItems value="#{canalsData.PROJECTS}" />
                                              <a4j:support event="onchange" action="#{canalsData.select}" reRender="canals,exp" />
                                          </h:selectOneMenu> 
                                          <a4j:status>
                                              <f:facet name="start">
                                                  <h:graphicImage value="img/spinner.gif"/>
                                              </f:facet>
                                          </a4j:status>
                                       
                              
                              
                              <rich:dataTable id="canals" value="#{canalsData.canals}"             
                                           styleClass="richbody" style="width:818px;" columnClasses="col" border="0" var="canal" rendered="#{not empty canalsData.canals}">
                                  
                                  <f:facet name="header" >
                                      <rich:columnGroup >
                                          <rich:column styleClass="richheader bodyrow">
                                              <h:outputText value="Canaljurisdiction Code" />
                                          </rich:column>
                                          <rich:column styleClass="richheader bodyrow">
                                              <h:outputText value="Canaljurisdiction Name" />
                                          </rich:column>
                                          <rich:column styleClass="richheader bodyrow">
                                              <h:outputText value="Short Code" />
                                          </rich:column>
                                          <rich:column styleClass="richheader bodyrow">
                                              <h:outputText value="Start Gauge Code" />
                                          </rich:column>
                                          <rich:column styleClass="richheader bodyrow">
                                              <h:outputText value="End Gauge Code" />
                                          </rich:column>
                                          <rich:column styleClass="richheader bodyrow">
                                              <h:outputText value="Sender Name" />
                                          </rich:column>
                                          <rich:column styleClass="richheader bodyrow">
                                              <h:outputText value="Mobile Number" />
                                          </rich:column>
                                          <rich:column styleClass="richheader bodyrow">
                                              <h:outputText value="Designation" />
                                          </rich:column>
                                          <rich:column styleClass="richheader lastcol bodyrow">
                                              <h:outputText value="Edit" />
                                          </rich:column>
                                            
                                      </rich:columnGroup>
                                  </f:facet>
                                  <rich:column styleClass="bodyrow">
                                      <h:outputText value="#{canal.get(0)}"/>     
                                  </rich:column>
                                  <rich:column styleClass="bodyrow">
                                      <center>    <h:outputText value="#{canal.get(1)}"/>  </center>   
                                  </rich:column>
                                  <rich:column styleClass="bodyrow">
                                      <h:outputText value="#{canal.get(2)}"/>
                                  </rich:column>
                                  <rich:column styleClass="bodyrow">
                                      <center>   <h:outputText value="#{canal.get(3)}"/>     </center>
                                  </rich:column>
                                  <rich:column styleClass="bodyrow">
                                      <h:outputText value="#{canal.get(4)}"/>     
                                  </rich:column>
                                  <rich:column styleClass="bodyrow">
                                      <h:outputText value="#{canal.get(5)}"/>     
                                  </rich:column>
                                  <rich:column styleClass="bodyrow">
                                      <h:outputText value="#{canal.get(6)}"/>     
                                  </rich:column>
                                  <rich:column styleClass="bodyrow">
                                      <h:outputText value="#{canal.get(7)}"/>     
                                  </rich:column>
                                  <rich:column styleClass="bodyrow lastcol">
                                      <center> <s:link action="#{canalsData.EditCanal}">
                                              <img src="img/Edit.gif" align="center" border="0"/>
                                              <f:param name="projectcnid" value="${canal.get(0)}"/>
                                              <f:param name="cname" value="${canal.get(1)}"/>
                                              <f:param name="shcode" value="${canal.get(2)}"/>
                                              <f:param name="stcode" value="${canal.get(3)}"/>
                                              <f:param name="endcode" value="${canal.get(4)}"/>
                                              <f:param name="sendname" value="${canal.get(5)}"/>
                                              <f:param name="mobilenum" value="${canal.get(6)}"/>
                                              <f:param name="cnsenderid" value="${canal.get(9)}"/>
                                              <f:param name="desg" value="${canal.get(8)}-${canal.get(10)}"/>
                                              
                                      </s:link>   </center>
                                  </rich:column>
                                  
                              </rich:dataTable>
                              <h:commandLink value="Export" action="#{org.jboss.seam.excel.excelExporter.export('form1:canals')}" target="-blank"/>  
                             
           

                  


      when i click on above link i get excel data but when i change the selectbox data then datatable data will change then click on link then also i got first data i am not get new data in excel........
      please any one can help me................