9 Replies Latest reply on Apr 5, 2011 4:46 AM by Ilya Shaikovsky

    Richfaces big problem

    Mohammad Weshah Novice

      Hello ALL

      I started working on live project on RichFaces 4 final , i use rich:extendableTable in page1 & i use rich:tabpanel in page2 ,when i call page1 the table rendered correctly with the following image :

      page1.gif

      and when i press a button and go to the page2 which include the tabpanel it appear incorrect :

       

      page1.gif

       

      but when i call page2 directlly from the browser it rendered correctlly :

       

      page1.gif

       

      and when i return from page2 to page 1 the table will be rendered incorrect :

       

      page1.gif

       

      my conclusion is when i call the page which include extended table or tabpanel directly from url it works successfully but when i call the page from button (navigationcase) the extended table & tabpanel rendered incorrectlly . why ?

       

      i test it on IE 8 & Firefox 3.6 , in need an answer becuase if it is bugy i have to change the technology .

       

      Regards

      Wish

        • 1. Re: Richfaces big problem
          Mohammad Weshah Novice

          there is a javascript error i do not know why it appear and if it cuase the problem :

           

          FireFox :

          Warning: Unexpected token in attribute selector: '!'.

          Source File: http://localhost:8084/RichFaces4TaskProject/MT/User/ManageUsers.jsf

          Line: 0

           

          IE 8:

          Webpage error details

             Message: Object expected

           

          I THINK THE BUGS IN THE EXTENDED TABLE & DATATABLE .

           

          Please advice ASAP.

          • 2. Richfaces big problem
            Nick Belaevski Master

            Hi,

             

            How do you navigate to page2: by ajax or no? Do you use dynamic ui:include or render the whole page?

            • 3. Re: Richfaces big problem
              Mohammad Weshah Novice

              by facesconfig commandaction button but

               

               

              is it the cuase for the problem and how can i fix it ?

               

              this is the error by firefox javascript error :

               

              <html><head><title>Apache Tomcat/6.0.26 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.render.RenderKitFactory

              javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:815)

              javax.faces.FactoryFinder.getFactory(FactoryFinder.java:317)

              com.sun.faces.context.FacesContextImpl.&lt;init&gt;(FacesContextImpl.java:128)

              com.sun.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:93)

              javax.faces.webapp.FacesServlet.service(FacesServlet.java:399)

              org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)

              </pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the Apache Tomcat/6.0.26 logs.</u></p><HR size="1" noshade="noshade"><h3>Apache Tomcat/6.0.26</h3></body></html>
              • 4. Re: Richfaces big problem
                Mohammad Weshah Novice

                Dear All

                I got it , i think it is a bug in a4j:CommandButton when use it to back to page that include a table the layout rendered incorrect but when use the h:commandButton it works successfully.

                 

                Please confirm.

                 

                Regards

                Wish79

                • 5. Re: Richfaces big problem
                  Rocky S Master

                  I don't think so it could be a bug, because moving back with h:commandButton roughly means refreshing the page/form which would rerender the table layout whereas using a4j:commandButton it is not refresh.

                   

                  BTW are you using browser back button or your implicit new back button. When you press browser back button, does it gives your warning that your page would be refreshed/submitted.

                  • 6. Re: Richfaces big problem
                    Mohammad Weshah Novice

                    i use implicit new back bury it.tton. you can t

                    • 7. Re: Richfaces big problem
                      Ilya Shaikovsky Master

                      according to the

                      java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.render.RenderKitFactory

                      javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:815)

                      javax.faces.FactoryFinder.getFactory(FactoryFinder.java:317)

                      com.sun.faces.context.FacesContextImpl.&lt;init&gt;(FacesContextImpl.java:128)

                      com.sun.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:93)

                      javax.faces.webapp.FacesServlet.service(FacesServlet.java:399)

                      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)

                       

                      it's definitelly not a table/extendeTable bug. change navigation controls from a4j: to h: . And that's not a RF problem but problem of Ajax navigation in JSF 2.

                      • 8. Re: Richfaces big problem
                        Mohammad Weshah Novice

                        now i do not have any exception at startup and the problem still , why it not appear if i use h:commandbutton , can you send my sample appliaction if you are sure it is not a bug.

                        • 9. Re: Richfaces big problem
                          Ilya Shaikovsky Master

                          In my app I have template:

                           

                          !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

                          <html xmlns="http://www.w3.org/1999/xhtml"

                                    xmlns:h="http://java.sun.com/jsf/html"

                                    xmlns:f="http://java.sun.com/jsf/core"

                                    xmlns:ui="http://java.sun.com/jsf/facelets"

                                    xmlns:a4j="http://richfaces.org/a4j">

                          <f:metadata>

                                    <f:viewParam name="skin" value="#{skinBean.skin}" />

                          </f:metadata>

                          <f:view contentType="text/html">

                                    <h:head>

                                              <title><ui:define name="title">Iteration Components Demo Application</ui:define></title>

                                              <meta http-equiv="content-type" content="text/xhtml; charset=UTF-8" />

                                    </h:head>

                            <h:body>

                                     <ui:insert>Default content</ui:insert>

                                    </h:body>

                          </f:view>

                          </html>

                           

                          and the index page:

                           

                          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

                          <html xmlns="http://www.w3.org/1999/xhtml"

                                    xmlns:h="http://java.sun.com/jsf/html"

                                    xmlns:f="http://java.sun.com/jsf/core"

                                    xmlns:ui="http://java.sun.com/jsf/facelets"

                                    xmlns:a4j="http://richfaces.org/a4j">

                          <body>

                          <ui:composition template="/templates/template.xhtml">

                                    <h:form>

                                    <h:panelGrid columns="1">

                                    <h:link style="font-size:14px;" value="Page test" outcome="page" />

                                              <h:commandLink style="font-size:14px;" value="Page test" action="page" />

                                              <a4j:commandLink style="font-size:14px;" value="Page test" action="page" />

                                              <h:commandLink style="font-size:14px;" value="Page test" action="page" >

                                <f:ajax/>

                                              </h:commandLink>

                          ...

                           

                           

                          Last two links were added just to test your case. And them not works (I expected that because them are working via ajax).

                          But the first two links works fine for me. And both using implicit navigation (no rule defined for both cases just page.xhtml available in the same webcontent directory)