1 Reply Latest reply on Nov 8, 2010 10:00 AM by Chandra Sreeraman

    Issue with Maani charts in jboss seam

    Ravi Kumar Newbie

      Hi,
      I am using Maani charts to diplay the customer details as graphs. Previously i was using them with Struts and they are working fine. I have three charts on a page. But when integrating them with seam, some times the default charts are being loaded as the method is not being called. But sometimes the methods are being called and all the charts are being displayed. If anybody is using maani charts with jboss seam, plz do guide me to solve this issue. Thanks in advance.


      my xhtml code is:


      <ui:composition 
            xmlns="http://www.w3.org/1999/xhtml"
            xmlns:s="http://jboss.com/products/seam/taglib"
            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:rich="http://richfaces.org/rich"
            template="/layout/blanktemplate.xhtml">
            <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE"/>
      
          <ui:define name="body">
          <h:form>
      
         <div class="row">
         <table>
         <tr>
         <td>
         <h:outputLabel for="siteId" value="User Name" rendered="#{loggedInUser.userTypes.userTypeId == 1}"></h:outputLabel>                    
                <h:selectOneMenu value="#{reportVO.user}" layout="lineDirection" rendered="#{loggedInUser.userTypes.userTypeId == 1}">
                <s:convertEntity/>
                <s:selectItems value="#{usr.resultList}" var="user" label="#{user.userName}" noSelectionLabel="All"/>                    
           </h:selectOneMenu>
         </td>
         <td>
         </td>
         <td>
         </td>
         </tr>
         <tr>
         <td><h:outputLabel for="startDate">Start Date:</h:outputLabel>
           <rich:calendar name="startDate" id="startDate" value="#{reportVO.startDate}" popup="true" event="onclick" 
           pattern="yyyy/MM/dd" enableManualInput="false">          
           </rich:calendar>
         </td>
         <td><h:outputLabel for="endDate">End Date:</h:outputLabel>
           <rich:calendar id="endDate" value="#{reportVO.endDate}" popup="true" event="onclick" 
           pattern="yyyy/MM/dd" enableManualInput="false">          
           </rich:calendar> 
         </td>
         <td><div class="actionButtons">
                <h:panelGroup style="display:block; text-align:center">
                <h:commandButton value="Show Reports" action="#{reports.reportDate}" align="center"/>
                </h:panelGroup>
           </div>
         </td>
         </tr>
         </table>
      </div>
      
          <table align="center">
           <tr>
                <td width="50%" style="text-align=middle !important">
                </td>
      
                <td width="50%" style="text-align=middle !important">
                <s:div rendered="true">
                <object width="400"
                      height="320">
                <param name="movie" value="#{facesContext.externalContext.requestContextPath}/reports/swf/charts.swf?library_path=#{facesContext.externalContext.requestContextPath}/reports/charts_library&amp;xml_source=#{facesContext.externalContext.requestContextPath}/reports/dummy.seam"/>
                     <param name="quality" value="high" />            
                     <param name="bgcolor" value="#666666" />
                     <param name="allowScriptAccess" value="sameDomain" />            
                <embed src="#{facesContext.externalContext.requestContextPath}/reports/swf/charts.swf?library_path=#{facesContext.externalContext.requestContextPath}/reports/charts_library&amp;xml_source=#{facesContext.externalContext.requestContextPath}/reports/dummy.seam"
                                    quality="high" 
                                 bgcolor="#666666"             
                              type="application/x-shockwave-flash"
                              NAME="charts"
                              allowScriptAccess="sameDomain" 
                              swLiveConnect="true" 
                                  width="400"
                              height="320"
                        PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
                </embed>
                </object>
                </s:div>          
                </td>
            </tr>
            <tr>
                <td width="50%" style="text-align=middle !important">
                <s:div rendered="true">
                <object width="400"
                      height="250">
                <param name="movie" value="#{facesContext.externalContext.requestContextPath}/reports/swf/charts.swf?library_path=#{facesContext.externalContext.requestContextPath}/reports/charts_library&amp;xml_source=#{facesContext.externalContext.requestContextPath}/reports/dummy_pie.seam"/>
                     <param name="quality" value="high" />            
                     <param name="bgcolor" value="#666666" />
                     <param name="allowScriptAccess" value="sameDomain" />            
                <embed src="#{facesContext.externalContext.requestContextPath}/reports/swf/charts.swf?library_path=#{facesContext.externalContext.requestContextPath}/reports/charts_library&amp;xml_source=#{facesContext.externalContext.requestContextPath}/reports/dummy_pie.seam"
                                    quality="high" 
                                 bgcolor="#666666"             
                              type="application/x-shockwave-flash"
                              NAME="charts"
                              allowScriptAccess="sameDomain" 
                              swLiveConnect="true" 
                                  width="400"
                              height="250"
                        PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
                </embed>
                </object>
                </s:div>
                </td>
                <td width="50%" style="text-align=middle !important">
                <s:div rendered="true">
                <object width="400"
                      height="250">
                <param name="movie" value="#{facesContext.externalContext.requestContextPath}/reports/swf/charts.swf?library_path=#{facesContext.externalContext.requestContextPath}/reports/charts_library&amp;xml_source=#{facesContext.externalContext.requestContextPath}/reports/dummy_campaigns.seam"/>
                <f:param name="siteId" value="200700"/>
                <f:param name="startDate" value="2007-03-10"/>
                     <param name="quality" value="high" />            
                     <param name="bgcolor" value="#666666" />
                     <param name="allowScriptAccess" value="sameDomain" />            
                <embed src="#{facesContext.externalContext.requestContextPath}/reports/swf/charts.swf?library_path=#{facesContext.externalContext.requestContextPath}/reports/charts_library&amp;xml_source=#{facesContext.externalContext.requestContextPath}/reports/dummy_campaigns.seam"
                                    quality="high" 
                                 bgcolor="#666666"             
                              type="application/x-shockwave-flash"
                              NAME="charts"
                              allowScriptAccess="sameDomain" 
                              swLiveConnect="true" 
                                  width="400"
                              height="250"
                        PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
                </embed>
                </object>
                </s:div>
                </td>
            </tr>
            </table>
            </h:form>
            </ui:define>
      
      </ui:composition>