3 Replies Latest reply on Sep 15, 2010 12:31 PM by xsa lefter

    Migrating From Seam 2.0.1 GA to Seam 2.2.0 GA with RichFaces 3.2

    Ambrish Singh Newbie

      Hi All,


      We are migrating an application built-on Seam 2.0.1 GA to Seam 2.2.0 GA with RichFaces 3.2 (Seam 2.2.0 comes with RichFaces 3.3).


      Everything is working fine , but the <a:commandLink> tags are not working. We are using RichFaces 3.2.
      Previously , it was working with Seam 2.0.1 GA.


      If I replace the RichFaces 3.3 library with 3.2 and still using the Seam 2.2.0 GA, we get following exception on server startup :




      Caused by: javax.faces.FacesException: java.lang.ClassNotFoundException: org.richfaces.renderkit.html.CustomizeableGradient
           at org.ajax4jsf.resource.ResourceBuilderImpl.registerConfig(ResourceBuilderImpl.java:202)
           at org.ajax4jsf.resource.ResourceBuilderImpl.registerResources(ResourceBuilderImpl.java:139)
           at org.ajax4jsf.resource.ResourceBuilderImpl.init(ResourceBuilderImpl.java:210)
           at org.ajax4jsf.renderkit.ChameleonRenderKitFactory.<init>(ChameleonRenderKitFactory.java:62)
           ... 147 more
      Caused by: java.lang.ClassNotFoundException: org.richfaces.renderkit.html.CustomizeableGradient
           at org.apache.commons.digester.Digester.createSAXException(Digester.java:3223)
           at org.apache.commons.digester.Digester.createSAXException(Digester.java:3249)
           at org.apache.commons.digester.Digester.startElement(Digester.java:1467)
           at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
           at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
           at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
           at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
           at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
           at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
           at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
           at org.apache.commons.digester.Digester.parse(Digester.java:1788)
           at org.ajax4jsf.resource.ResourceBuilderImpl.registerConfig(ResourceBuilderImpl.java:195)
           ... 150 more




      Our deployment environment is



      Jboss Server 4.2.2


      Seam 2.2.0


      RichFaces 3.2



      Can we use RichFaces 3.2 with Seam 2.2.0 ?. If not then Can anybody tell me what will be the modification in the XHTML pages so that a:commandLink also work ?.


      Thanks & Regards,


      Ambrish





        • 1. Re: Migrating From Seam 2.0.1 GA to Seam 2.2.0 GA with RichFaces 3.2
          xsa lefter Newbie

          Hi.. Ambrish Singh. Do you have resolved your problem? I think your exception happened due to:


          Caused by: java.lang.ClassNotFoundException: org.richfaces.renderkit.html.CustomizeableGradient



          You don't need to back to richfaces 3.2. Have you checked that file richfaces-impl.jar is on your classpath? You can look at this in the deployed-jars.list file on your project.


          Hope this help.

          • 2. Re: Migrating From Seam 2.0.1 GA to Seam 2.2.0 GA with RichFaces 3.2
            Ambrish Singh Newbie

            Hi Lefter,


            The exception is not coming now.But the modal panel is not displaying. Here is my code for displaying modal panel on a:commandButton click.


            The ajax commandButton is :



            <a:form id="showAddform" ajaxSubmit="true">
                                     <a:commandButton id="addRateListButton" 
                                          value="#{messages.btnNewRateList}" 
                                          reRender="commonPanel"                                        
                                          action="#{manageRateList.renderAddRateList}"
                                          onmouseover="reloadHelp('#{messages.hlpNewRateList}');"
                                          onmouseout="reloadHelp('#{messages.hlpRateListPage}');" >                         
                                     </a:commandButton>          
                                </a:form>




            The modal panel code is :




            <a:outputPanel id="commonPanel" >     
                      
                      <rich:modalPanel id="commonMp" styleClass="modalPanel" top="10"
                                autosized="true" keepVisualState="#{manageRateList.showOverlay}"
                                minWidth="650" minHeight="200" 
                                style="background-image: url('../img/overlayBg.png');background-repeat: repeat;background-color: transparent;"
                                shadowDepth="#{messages.valShadowDepth}"
                                headerClass="modalPanel-header" controlsClass="modalPanel-controls">                    
                           
                                <f:facet name="header">
                                     <h:outputText value="#{manageRateList.modelPanelHead}" />
                                </f:facet>
                                <f:facet name="controls">                    
                                <a:form id="closeLayer">
                                     <a:commandLink action="#{manageRateList.closeLayer}"  
                                     oncomplete="Richfaces.hideModalPanel('commonMp')" >
                                     <h:graphicImage value="/img/closeButton.png" alt="X" border="0" />                         
                                     </a:commandLink>                         
                                </a:form>
                                </f:facet>               
                                
                                <h:panelGrid styleClass="modalPanel-panelGrid">
                                     <h:message styleClass="message" for="commonPanel" style="color:red;"/>
                                     <a:form ajaxSubmit="true" id="panelForms">
                                     <h:panelGrid columns="1" columnClasses="name"
                                               rendered="#{manageRateList.formToLoad=='addEditRateListForm'}"
                                               styleClass="panelGrid">
                                               
                                     <s:div styleClass="modalPanel-panelGrid-container-div">
                                     
                                               <h:panelGrid columns="2" border="0"
                                                    columnClasses="formLabel,formValue" rowClasses="formLabel">
                                                    <s:decorate id="labelDecoration" template="../layout/edit.xhtml" >
                                                         <ui:define name="label">#{messages.lblRateListTitle}</ui:define>
                                                         <h:inputText id="name" value="#{rateList.strFileName}"
                                                              disabled="#{rateList.irateListId != null}"
                                                               validator="#{manageRateList.validateFilename}" 
                                                               required="true" requiredMessage = "Filename is must" 
                                                         />
                                                    </s:decorate>
                                                    <s:decorate id="txtDecoration" template="../layout/edit.xhtml">
                                                         <ui:define name="label">#{messages.lblNumberOfTextBoxes}</ui:define>
                                                         <h:inputText id="name" value="#{rateList.inumberOfTextBoxes}" 
                                                         required="true" validator="#{manageRateList.requiredField}"/>
                                                    </s:decorate>
                                               </h:panelGrid>
                                               <h:panelGrid border="0" columnClasses="formLabel,formValue"
                                                    rowClasses="formLabel">
                                                    <s:decorate id="descDecoration" template="../layout/edit.xhtml">
                                                         <ui:define name="label">#{messages.lblRateListDescription}
                                                    </ui:define>
                                                         <h:inputTextarea id="desc" rows="8" cols="65"
                                                              value="#{rateList.txtDescription}" 
                                                              required="true"/>
                                                    </s:decorate>
                                               </h:panelGrid>
                                               <a:commandButton id="saveRateListButton"
                                                    value="#{messages.btnSave}" reRender="commonPanel"
                                                    style="margin-left: 6px;" 
                                                    action="#{manageRateList.persistRateList}"
                                                    onclick="this.disabled=true"
                                                    rendered="#{rateList.irateListId == null}"
                                                    onmouseover="reloadHelp('#{messages.hlpSaveRateList}');"
                                                    onmouseout="reloadHelp('#{messages.hlpRateListPage}');"
                                                    oncomplete="this.disabled=false" />
                                               <a:commandButton id="updateRateListButton"
                                                    value="#{messages.btnUpdate}" reRender="commonPanel"
                                                    style="margin-left: 6px;"
                                                    action="#{manageRateList.updateRateList}"
                                                    onclick="this.disabled=true"
                                                    rendered="#{rateList.irateListId != null}"
                                                    onmouseover="reloadHelp('#{messages.hlpSaveRateList}');"
                                                    onmouseout="reloadHelp('#{messages.hlpRateListPage}');"
                                                    oncomplete="this.disabled=false" />
                                                    
                                               <a:commandButton id="cancelAddEdit" value="#{messages.btnCancel}"
                                                         style="margin-left: 4px;" action="#{manageRateList.closeLayer}"
                                                         oncomplete="Richfaces.hideModalPanel('commonMp')" /> 
                                     </s:div>
                                     </h:panelGrid>
            </a:form>
                           </h:panelGrid>
                           
                      </rich:modalPanel>     
                 </a:outputPanel>





            Regards,


            Ambrish








            • 3. Re: Migrating From Seam 2.0.1 GA to Seam 2.2.0 GA with RichFaces 3.2
              xsa lefter Newbie

              Hi.. Have you try adding:



              onclick="Richfaces.showModalPanel('commonMp');"
              



              or


              onclick="#{rich:component('commonMp')}.show();"
              



              in your command button?