7 Replies Latest reply on May 3, 2011 5:26 AM by lvdberg

    Faceing problem with facet="footer" inside the p:column and  Not able to convert my seam project from primeface version 1.0.0 to primeface version 2.2.1

    dhanarajar
      Actually in my project i am converting all my rich:datatables to p:datatables....

      While converting not able to display the footers in p:datatable with my primeface version 1.0.0...

      I worte my p:datatable like this-->>

      <p:dataTable id="lodgingChargelistId"  width="800" var="lodgingCharge"  paginatorPosition="bottom"  value="#{financialReports.getLodgingCharges()}"  rowClasses="rich-table-oddRow,rich-table-evenRow" paginator="#{financialReports.getLodgingCharges().size()>10}" rows="10" >
                     
      <p:column >
      <f:facet  name="header">
      <h:outputText value="#{messages['title.reference']} No" />
      </f:facet>
      <h:outputText align="left"  value="#{lodgingCharge.referenceNumber}" />
      </p:column>

      <p:column >          
      <f:facet name="header">          
      <h:outputText value="#{messages['title.occupancyType']}" />     </f:facet>
      <h:outputText align="left" value="#{lodgingCharge.occupancyType.name}" />     
      </p:column>               
                     
      <p:column >
      <f:facet name="header">
      <h:outputText value="#{messages['title.room/bedno']}" />
      </f:facet>
      <h:outputText style="text-align:left" value="#{lodgingCharge.roomNo}" />
      </p:column>          
           
      <p:column >

      <f:facet name="header" >
      <h:outputText value="#{messages['title.room']} Type" />     </f:facet>

      <h:outputText style="text-align:left" value="#{lodgingCharge.roomType}" />

      <f:facet name="footer">
      <h:outputText value=" #{messages['title.totals']}"></h:outputText>
      </f:facet>

      </p:column>     
           


           

      <p:column >

      <f:facet name="header">
      <h:outputText value="#{messages['title.noOfNights']}" />
      </f:facet>

      <h:outputText style="text-align:left"  value="#{lodgingCharge.noOfNights}"></h:outputText>

      <f:facet name="footer">
      <h:outputText style="text-align: left; background-color:#565656; color:white; " value="#{financialReports.noOfNights}" styleClass="hightLight" ></h:outputText>
      </f:facet>

      </p:column>
                     
      <p:column >

      <f:facet name="header">
      <h:outputText value="No Of Rooms" />
      </f:facet>

      <h:outputText style="text-align:left" value="#{lodgingCharge.noOfBookables}"></h:outputText>

      <f:facet name="footer">
      <h:outputText style="text-align: left; background-color:#565656; color:white; " value="#{financialReports.noOfBookables}" styleClass="hightLight" ></h:outputText>
      </f:facet>

      </p:column>
                     
      <p:column >

      <f:facet name="header">
      <h:outputText value="#{messages['title.lodging']}" />
      </f:facet>

      <h:outputText style="text-align:right" value="#{systemUtils.formatDecimal(lodgingCharge.totalReservationCharges, selectedInstance.currencyFormat.businessValue)}"></h:outputText>

      <f:facet name="footer">
      <h:outputText  value="#{systemUtils.formatDecimal(financialReports.groupTotal, selectedInstance.currencyFormat.businessValue)}" styleClass="hightLight" ></h:outputText>
      </f:facet>

      </p:column>

      <p:column >
                          <f:facet name="header">
                               <h:outputText value="Average Surcharges/#{messages['title.day']}" />
                          </f:facet>
                               <h:outputText style="text-align:right" value="#{systemUtils.formatDecimal(lodgingCharge.surcharges, selectedInstance.currencyFormat.businessValue)}"></h:outputText>
                               <f:facet name="footer">
                                    <h:outputText  value="#{systemUtils.formatDecimal(financialReports.totalSurCharges, selectedInstance.currencyFormat.businessValue)}" styleClass="hightLight"  ></h:outputText>
                               </f:facet>
                     </p:column>
                     <p:column  >
                          <f:facet name="header">
                               <h:outputText value="Average Tax/#{messages['title.day']}" />
                          </f:facet>
                               <h:outputText style="text-align:right" value="#{systemUtils.formatDecimal(lodgingCharge.taxes, selectedInstance.currencyFormat.businessValue)}"></h:outputText>
                               <f:facet name="footer">
                                     <h:outputText  value="#{systemUtils.formatDecimal(financialReports.totalTax, selectedInstance.currencyFormat.businessValue)}" styleClass="hightLight" ></h:outputText>
                               </f:facet>
                     </p:column>
                     <p:column  rendered="#{productVisibility.isEzeeDesk()}">
                               <f:facet name="header">
                                    <h:outputText value="#{messages['title.discount']}" />
                               </f:facet>
                          <h:outputText style="text-align:right" value="#{systemUtils.formatDecimal(lodgingCharge.discount, selectedInstance.currencyFormat.businessValue)}"></h:outputText>
                               <f:facet name="footer">
                                    <h:outputText   value="#{systemUtils.formatDecimal(financialReports.totalDiscount, selectedInstance.currencyFormat.businessValue)}" styleClass="hightLight" ></h:outputText>                               
                               </f:facet>
                </p:column>
                     <p:column >
                          <f:facet name="header">
                          <h:outputText value="#{messages['title.total']}" />
                          </f:facet>
                               <h:outputText style="text-align:right" value="#{systemUtils.formatDecimal(lodgingCharge.charges, selectedInstance.currencyFormat.businessValue)}"></h:outputText>
                               <f:facet name="footer">
                                     <h:outputText  value="#{systemUtils.formatDecimal(financialReports.totalCharges, selectedInstance.currencyFormat.businessValue)}" styleClass="hightLight" ></h:outputText>                                               
                               </f:facet>
                     </p:column>
                     
                     
                </p:dataTable>

      to solve this pbm checked this link -->>
      http://www.primefaces.org/showcase/ui/datatableHeaderFooter.jsf;jsessionid=11ACD45BF8956441AFF95DB0C30AFD70

      but how i did they also did like that only...

      but i was not able to display those footers.....

      Thing is they did the same in primeface Version 2.2.1

      So,
      I have downloaded primefaces 2.2.1 jar fro this link -->>

      http://www.primefaces.org/downloads.html

      And i removed previous jar(primeface 1.0.0) from my project and i added the new one(version 2.2.1)

      aftr done the above while building i am getting the following error--->>>>>

      com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED!
        Source Document: jar:file:/D:/jboss-4.2.3.GA/server/default/deploy/ezeeDesk.ear/ezeeDesk.war/WEB-INF/lib/primefaces-2.2.1.jar!/META-INF/faces-config.xml
        Cause: Class 'org.primefaces.component.autocomplete.AutoCompleteRenderer' is missing a runtime dependency:


      Here i have attached the sample image for reference ..

      http://192.168.1.150/web/prime%20Table.bmp
      http://192.168.1.150/web/rich%20datatable.PNG

      If possible tell me how to display the facet="footer" with my primeface version 1.0.0

          (OR)

      Tel me how to convert my project from version 1.0.0 to 2.2.1


      Thanks In advance!!!!!!!!!!!!!!!!!!





        • 1. Re: Faceing problem with facet="footer" inside the p:column and  Not able to convert my seam project from primeface version 1.0.0 to primeface version 2.2.1
          dhanarajar
          <blockquote>
          _dhanaraja rajendiran wrote on Apr 29, 2011 02:35:_<br/>

          Actually in my project i am converting all my rich:datatables to p:datatables....

          While converting not able to display the footers in p:datatable with my primeface version 1.0.0...

          I worte my p:datatable like this-->>

          <p:dataTable id="lodgingChargelistId"  width="800" var="lodgingCharge"  paginatorPosition="bottom"  value="#{financialReports.getLodgingCharges()}"  rowClasses="rich-table-oddRow,rich-table-evenRow" paginator="#{financialReports.getLodgingCharges().size()>10}" rows="10" >
                                 
          <p:column >
          <f:facet  name="header">
          <h:outputText value="#{messages['title.reference']} No" />
          </f:facet>
          <h:outputText align="left"  value="#{lodgingCharge.referenceNumber}" />
          </p:column>

          <p:column >              
          <f:facet name="header">          
          <h:outputText value="#{messages['title.occupancyType']}" />       </f:facet>
          <h:outputText align="left" value="#{lodgingCharge.occupancyType.name}" />
          </p:column>                      
                                 
          <p:column >
          <f:facet name="header">
          <h:outputText value="#{messages['title.room/bedno']}" />
          </f:facet>
          <h:outputText style="text-align:left" value="#{lodgingCharge.roomNo}" />
          </p:column>              
                 
          <p:column >

          <f:facet name="header" >
          <h:outputText value="#{messages['title.room']} Type" />   </f:facet>

          <h:outputText style="text-align:left" value="#{lodgingCharge.roomType}" />

          <f:facet name="footer">
          <h:outputText value=" #{messages['title.totals']}"></h:outputText>
          </f:facet>

          </p:column>      
                 


                 

          <p:column >

          <f:facet name="header">
          <h:outputText value="#{messages['title.noOfNights']}" />
          </f:facet>

          <h:outputText style="text-align:left"  value="#{lodgingCharge.noOfNights}"></h:outputText>

          <f:facet name="footer">
          <h:outputText style="text-align: left; background-color:#565656; color:white; " value="#{financialReports.noOfNights}" styleClass="hightLight" ></h:outputText>
          </f:facet>

          </p:column>
                                 
          <p:column >

          <f:facet name="header">
          <h:outputText value="No Of Rooms" />
          </f:facet>

          <h:outputText style="text-align:left" value="#{lodgingCharge.noOfBookables}"></h:outputText>

          <f:facet name="footer">
          <h:outputText style="text-align: left; background-color:#565656; color:white; " value="#{financialReports.noOfBookables}" styleClass="hightLight" ></h:outputText>
          </f:facet>

          </p:column>
                                 
          <p:column >

          <f:facet name="header">
          <h:outputText value="#{messages['title.lodging']}" />
          </f:facet>

          <h:outputText style="text-align:right" value="#{systemUtils.formatDecimal(lodgingCharge.totalReservationCharges, selectedInstance.currencyFormat.businessValue)}"></h:outputText>

          <f:facet name="footer">
          <h:outputText  value="#{systemUtils.formatDecimal(financialReports.groupTotal, selectedInstance.currencyFormat.businessValue)}" styleClass="hightLight" ></h:outputText>
          </f:facet>

          </p:column>

          <p:column >
                                          <f:facet name="header">
                                                  <h:outputText value="Average Surcharges/#{messages['title.day']}" />
                                          </f:facet>
                                                  <h:outputText style="text-align:right" value="#{systemUtils.formatDecimal(lodgingCharge.surcharges, selectedInstance.currencyFormat.businessValue)}"></h:outputText>
                                                  <f:facet name="footer">
                                                          <h:outputText  value="#{systemUtils.formatDecimal(financialReports.totalSurCharges, selectedInstance.currencyFormat.businessValue)}" styleClass="hightLight"  ></h:outputText>
                                                  </f:facet>
                                  </p:column>
                                  <p:column  >
                                          <f:facet name="header">
                                                  <h:outputText value="Average Tax/#{messages['title.day']}" />
                                          </f:facet>
                                                  <h:outputText style="text-align:right" value="#{systemUtils.formatDecimal(lodgingCharge.taxes, selectedInstance.currencyFormat.businessValue)}"></h:outputText>
                                                  <f:facet name="footer">
                                                           <h:outputText  value="#{systemUtils.formatDecimal(financialReports.totalTax, selectedInstance.currencyFormat.businessValue)}" styleClass="hightLight" ></h:outputText>
                                                  </f:facet>
                                  </p:column>
                                  <p:column  rendered="#{productVisibility.isEzeeDesk()}">
                                                  <f:facet name="header">
                                                          <h:outputText value="#{messages['title.discount']}" />
                                                  </f:facet>
                                          <h:outputText style="text-align:right" value="#{systemUtils.formatDecimal(lodgingCharge.discount, selectedInstance.currencyFormat.businessValue)}"></h:outputText>
                                                  <f:facet name="footer">
                                                          <h:outputText   value="#{systemUtils.formatDecimal(financialReports.totalDiscount, selectedInstance.currencyFormat.businessValue)}" styleClass="hightLight" ></h:outputText>                               
                                                  </f:facet>
                          </p:column>
                                  <p:column >
                                          <f:facet name="header">
                                          <h:outputText value="#{messages['title.total']}" />
                                          </f:facet>
                                                  <h:outputText style="text-align:right" value="#{systemUtils.formatDecimal(lodgingCharge.charges, selectedInstance.currencyFormat.businessValue)}"></h:outputText>
                                                  <f:facet name="footer">
                                                           <h:outputText  value="#{systemUtils.formatDecimal(financialReports.totalCharges, selectedInstance.currencyFormat.businessValue)}" styleClass="hightLight" ></h:outputText>                                                
                                                  </f:facet>
                                  </p:column>
                                 
                                 
                          </p:dataTable>

          to solve this pbm checked this link -->>
          http://www.primefaces.org/showcase/ui/datatableHeaderFooter.jsf;jsessionid=11ACD45BF8956441AFF95DB0C30AFD70

          but how i did they also did like that only...

          but i was not able to display those footers.....

          Thing is they did the same in primeface Version 2.2.1

          So,
          I have downloaded primefaces 2.2.1 jar fro this link -->>

          http://www.primefaces.org/downloads.html

          And i removed previous jar(primeface 1.0.0) from my project and i added the new one(version 2.2.1)

          aftr done the above while building i am getting the following error--->>>>>

          com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED!
            Source Document: jar:file:/D:/jboss-4.2.3.GA/server/default/deploy/ezeeDesk.ear/ezeeDesk.war/WEB-INF/lib/primefaces-2.2.1.jar!/META-INF/faces-config.xml
            Cause: Class 'org.primefaces.component.autocomplete.AutoCompleteRenderer' is missing a runtime dependency:


          Here i have attached the sample image for reference ..

          http://192.168.1.150/web/prime%20Table.bmp
          http://192.168.1.150/web/rich%20datatable.PNG

          If possible tell me how to display the facet="footer" with my primeface version 1.0.0

              (OR)

          Tel me how to convert my project from version 1.0.0 to 2.2.1


          currently i am using jsf version 1.2.....

          previously i configured my project xml files with primefaces 1.0 ,but now i need to configure primeface version 2.2.1.......

          Simply if am changing the jar and running with verion 1.0 configurations means i am getting the above mentioned error...............

          If any one knows ,help me out what and all i need to configure in my xml files....................and how to configure those...............

          Thanks In advance!!!!!!!!!!!!!!!!!!






          </blockquote>

          • 3. Re: Faceing problem with facet="footer" inside the p:column and  Not able to convert my seam project from primeface version 1.0.0 to primeface version 2.2.1
            lvdberg

            Hi,


            as stated before you must migrate to JSF 2.0 if you want to use Primefaces 2-x- Although there is a newer version of the primefaces 1.x version available I doubt if your approach will work because I don't think the prime faces column supports the same facets as Rich. besides that Prime for JSF 1.x is not supported anymore (very silly, because I like Prime and I am not willing to migrate to JSF 2.0)


            The only reason I can imagine that you want to migrate is that Prime suppoorts direct export to Excel, CSV and XML, but that is so horribly, faulty that I advice you to stick to Rich and creat a simple exporter (you have the data already in memory, so it isn't really difficult).


            Leo

            • 4. Re: Faceing problem with facet="footer" inside the p:column and  Not able to convert my seam project from primeface version 1.0.0 to primeface version 2.2.1
              dhanarajar
              Hi !!

              I was thankful to you for giving me this idea....

              What you are saying is absolutely correct....

              Currently i am using rich:datatable only But,

              with this rich:datatable for displaying the PDF and XL I am writing the seperate JSP's......

              But You mentioned this -->>

              Create the simple exporter in RICH FACES itself....Badly i dont know about that rich data exporter

              According to me without seperate JSP's for designing the PDF and XL
              It is not possible to display the PDF n XL as like p:dataTable.

              If this is possible means please guide me regarding this...

              "Actually my target here is to reduce the unnecessary jsp's for PDF and XL"

              For your reference i attached one of my PDF jsp here (For rich:dataTable)



              <p:document xmlns:p="http://jboss.com/products/seam/pdf"
              xmlns:ui="http://java.sun.com/jsf/facelets"
              xmlns:s="http://jboss.com/products/seam/taglib"
              xmlns:h="http://java.sun.com/jsf/html" 
              pageSize="A4"
              type="PDF">

              <p:table  columns="5"  widthPercentage="100" headerRows="1" widths="15 15 15 15 15">
                                                        <p:cell  horizontalAlignment="center" paddingBottom="5"><p:paragraph><p:font color="black" name="TIMES-ROMAN" style="BOLD" size="8"><p:text value="#{messages['title.roomNo'] }"></p:text></p:font></p:paragraph></p:cell>

              <p:cell  horizontalAlignment="center" paddingBottom="5"><p:paragraph><p:font  name="TIMES-ROMAN"  color="black" style="BOLD" size="8"><p:text value="#{messages['title.guest']} #{messages['title.name']}"></p:text></p:font></p:paragraph></p:cell>                    

              <p:cell  horizontalAlignment="center" paddingBottom="5"><p:paragraph><p:font  name="TIMES-ROMAN"  color="black" style="BOLD" size="8"><p:text value="#{messages['title.companyName'] }"></p:text></p:font></p:paragraph></p:cell>

              <p:cell  horizontalAlignment="center" paddingBottom="5"><p:paragraph><p:font  name="TIMES-ROMAN"  color="black" style="BOLD" size="8"><p:text value="#{messages['title.checkInDate'] }"></p:text></p:font></p:paragraph></p:cell>

              <p:cell  horizontalAlignment="center" paddingBottom="5"><p:paragraph><p:font  name="TIMES-ROMAN"  color="black" style="BOLD" size="8"><p:text value="#{messages['title.pax'] }"></p:text></p:font></p:paragraph></p:cell>
                                          
                                            
                                

              <ui:repeat var="roomService" value="#{guestReports.retriveAllRooms()}">            
                                       
                                       <p:cell horizontalAlignment="left" verticalAlignment="left"><p:font style="NORMAL" size="8" name="TIMES-ROMAN"><p:paragraph>#{roomService.roomNo}</p:paragraph></p:font></p:cell>
                                       <p:cell horizontalAlignment="left" verticalAlignment="left"><p:font style="NORMAL" size="8" name="TIMES-ROMAN"><p:paragraph>#{roomService.lastName} #{roomService.firstName}</p:paragraph></p:font></p:cell>                    
                                       <p:cell horizontalAlignment="left" verticalAlignment="left"><p:font style="NORMAL" size="8" name="TIMES-ROMAN"><p:paragraph>#{roomService.businessName}</p:paragraph></p:font></p:cell>
                                       <p:cell horizontalAlignment="left" verticalAlignment="left"><p:font style="NORMAL" size="8" name="TIMES-ROMAN"><p:paragraph>#{systemUtils.formatDate(roomService.checkIn,selectedInstance.dateFormat.businessValue)}</p:paragraph></p:font></p:cell>
                                       <p:cell horizontalAlignment="left" verticalAlignment="left"><p:font style="NORMAL" size="8" name="TIMES-ROMAN"><p:paragraph>#{roomService.pax}</p:paragraph></p:font></p:cell>
                                       
                                       
                                       
                             </ui:repeat>                
                                  
              </p:table>

                        
              </p:document>



              And If no other go ,to finish my aim need to convert to primeface 2.x and jsf 2.0 means,

              Kindly guide me how to convertt to jsf2.0....

              My versions: 1.jboss-seam-2.2.0.GA
                           2.jboss-4.2.3.GA
                           3.apache-ant-1.7.1
                           4.primeface2.2.1(yet to be add)
                           5.JSF2.0(Need to config)

              with my jboss-seam-2.2.0.GA defualtly i got one JSF version 1.2

              Now I downloaded jsf 2.0 from the folloowing link-->>
              http://download.java.net/maven/1/javax.faces/jars/

              1. jsf-api-2.0.0-SNAPSHOT.jar   
              2.  jsf-impl-2.0.0-SNAPSHOT.jar 

              and i deleted the defualt jars from the "lib" folder and added my jars....

              And checked whthr JSF2.0 is wrking or not by using the jsf2.0 specific tags <h:link>

              While using I am getting below error-->>

              <h:link> Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: link

              (@Note:Top of my jsp i included xmlns:h="http://java.sun.com/jsf/html")
              but i don know whthr i downloaded the correct jar or not.....

              give me some sample links to download JSF2.0 jars..as i triead already...............



              • 5. Re: Faceing problem with facet="footer" inside the p:column and  Not able to convert my seam project from primeface version 1.0.0 to primeface version 2.2.1
                lvdberg

                Hi,


                My advice is to built a simple exporter, because to make it work you also need to upgrade your App-server to 5/6 (unless somebody on this forum has succesfully implemented JSF 2.0 on an Appserver 4.2).


                The most simple way for you is to create a Seam PDF/Excel Templete which does the exporting.


                Leo

                • 6. Re: Faceing problem with facet="footer" inside the p:column and  Not able to convert my seam project from primeface version 1.0.0 to primeface version 2.2.1
                  dhanarajar

                  Hi!!


                  Can I just give one try on this,(unless somebody on this forum has succesfully implemented JSF 2.0 on an Appserver 4.2).


                  to do the above with application server 4.2 I need to implement the jars of JSF2.0 to my prjct..


                  Thing here was not able to find those jars...


                  Kindly guide me regarding the above...


                  Because i am in the need of doing this as my management asking this requirement in our application..........


                  • 7. Re: Faceing problem with facet="footer" inside the p:column and  Not able to convert my seam project from primeface version 1.0.0 to primeface version 2.2.1
                    lvdberg

                    Hi,


                    Try to download them from the JBoss repository (if you use Maven it will do it for you):





                    https://repository.jboss.org/nexus/content/groups/public-jboss/javax/faces/jsf-api/


                    Again, my advice is to stick with the simpler approach and not to complicate it more than really needed. Appserver 4.2 is NOT supporting JSF 2.0 out of the box, and I think you will encounter additional (configuration) problems.



                    Leo


                    P.S: This is NOT the right place to ask for JSF 2.0 configuration questions!