10 Replies Latest reply on Nov 20, 2014 3:07 AM by liumin hu

    Why Richface so many BUGS

    YANG HU Newbie

      Rencently,I want to use RF in my projects,But I entercounted so many bugs.

      I spent 100+ hours on configuring it,but failed.My project use Myfaces(2.2.5),Primefaces(5.1) and PrettyFaces.

      Bug1.Tracker Service not initialized. in some version(some 4s and 5), this bug existed. Resolve it by adding system-event-listener in faces-config.xml.

      <system-event-listener>

                  <system-event-listener-class>org.richfaces.services.InitializationListener</system-event-listener-class>

                  <system-event-class>javax.faces.event.PostConstructApplicationEvent</system-event-class>

              </system-event-listener>

      Bug2.There is NO org.richfaces.Scripts(some 4 versions),org.richfaces.ui.Scripts(5 version).

       

      javax.faces.FacesException: Undefined component type org.richfaces.ui.Scripts
      at org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationImpl.java:1464)
      at javax.faces.application.ApplicationWrapper.createComponent(ApplicationWrapper.java:129)
      at org.richfaces.javascript.JavaScriptServiceImpl.getOrCreateScriptResource(JavaScriptServiceImpl.java:107)
      at org.richfaces.javascript.JavaScriptServiceImpl.addScript(JavaScriptServiceImpl.java:64)
      at org.richfaces.ui.common.DivPanelRenderer.writeJavaScript(DivPanelRenderer.java:135)
      at org.richfaces.ui.toggle.panelMenu.PanelMenuRenderer.doEncodeBegin(PanelMenuRenderer.java:86)

      Lack Scripts class.

      Bug3.Wrong generated resources links.the links generated start with /org.richfaces.resources/javax.faces.resouce/org.richfaces.staticResources/.

      if u use

      <servlet>

              <servlet-class>org.richfaces.webapp.ResourceServlet</servlet-class>

              <load-on-startup>1</load-on-startup>

          </servlet>

          <servlet-mapping>

              <servlet-name>Resource Servlet</servlet-name>

              <url-pattern>/org.richfaces.resources/*</url-pattern>

          </servlet-mapping>

      So bad,you'll get fatal error,myfaces's FlashImpl throw NULLPOINTEREXCEPTION in isKeepMessages method.

        @Override

          public boolean isKeepMessages()

          {

              FacesContext facesContext = FacesContext.getCurrentInstance();

              log.info("facesContext:"+facesContext);

              ExternalContext externalContext = facesContext.getExternalContext();

              log.info("externalContext:"+externalContext);

              Map<String, Object> requestMap = externalContext.getRequestMap();

              log.info("requestMap:"+requestMap);

              Boolean keepMessages = (Boolean) requestMap.get(FLASH_KEEP_MESSAGES);

              log.info("keepMessages:"+keepMessages);

       

       

       

       

              return (keepMessages == null ? Boolean.FALSE : keepMessages);

          }

      the first log output is NULL.

       

       

      I've tried serveral versions,but there were some bugs as above.

      I want to use the newest version 5.0.0.Alpha3 in projects.

      Please help me.