AppFuse
  1. AppFuse
  2. APF-1351

Replace myfaces and tomahawk with PrimeFaces

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 3.0
    • Component/s: Web - JSF
    • Labels:
    • Environment:
      All

      Description

      Replace myfaces and tomahawk by mojara and primefaces, using facelets as templating.

      1. primefaces.patch
        213 kB
        Matt Raible

        Activity

        Hide
        Gilberto C Andrade added a comment -

        Project with initial work: 1-replaced myfaces; 2-replaced tomahawk 3-removed the jsp and jsf packages; 4-adjusted some validations and replaced the dataTable component.

        Show
        Gilberto C Andrade added a comment - Project with initial work: 1-replaced myfaces; 2-replaced tomahawk 3-removed the jsp and jsf packages; 4-adjusted some validations and replaced the dataTable component.
        Hide
        Ahmed CHKIOUA added a comment -

        Hi Giberto,
        Is the attached PrimeFaces example "mypoject.zip" works fine?
        We have tried to run it but an execution error was notified: "the application was not properly initialized at startup".

        Thanks in advance for your response.

        Show
        Ahmed CHKIOUA added a comment - Hi Giberto, Is the attached PrimeFaces example "mypoject.zip" works fine? We have tried to run it but an execution error was notified: "the application was not properly initialized at startup". Thanks in advance for your response.
        Hide
        Gilberto C Andrade added a comment -

        Hi, Ahmed!

        I use the tomcat plguin and it works.
        <code>
        mvn clean tomcat:run -Ph2
        </code>
        I've tried with jetty, but it doesn't work - I didn't investigate the problem with jetty yet.

        Show
        Gilberto C Andrade added a comment - Hi, Ahmed! I use the tomcat plguin and it works. <code> mvn clean tomcat:run -Ph2 </code> I've tried with jetty, but it doesn't work - I didn't investigate the problem with jetty yet.
        Hide
        Ahmed CHKIOUA added a comment -

        Hi Giberto,

        Thank you for the update.
        Example tested with tomcat server... We confirm that it works well.

        Show
        Ahmed CHKIOUA added a comment - Hi Giberto, Thank you for the update. Example tested with tomcat server... We confirm that it works well.
        Hide
        Matt Raible added a comment -

        I'm able to run this with tomcat:run. However, when I run it with jetty:run, I get the following error:

        DEBUG [main] LocaleFilter.init(197) | Filter 'localeFilter' configured successfully
        2013-01-31 22:28:07.683:WARN:/:unavailable
        java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory
        at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:951)
        at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:316)
        at javax.faces.webapp.FacesServlet.init(FacesServlet.java:302)
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:492)
        at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:312)

        After starting with tomcat:run, I can login, but I can't navigate to Edit Profile or Edit / Add a user. Does this functionality work on your machine?

        Show
        Matt Raible added a comment - I'm able to run this with tomcat:run. However, when I run it with jetty:run, I get the following error: DEBUG [main] LocaleFilter.init(197) | Filter 'localeFilter' configured successfully 2013-01-31 22:28:07.683:WARN:/:unavailable java.lang.IllegalStateException: Application was not properly initialized at startup, could not find Factory: javax.faces.context.FacesContextFactory at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:951) at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:316) at javax.faces.webapp.FacesServlet.init(FacesServlet.java:302) at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:492) at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:312) After starting with tomcat:run, I can login, but I can't navigate to Edit Profile or Edit / Add a user. Does this functionality work on your machine?
        Hide
        Matt Raible added a comment -

        Attached a patch for converting AppFuse to use PrimeFaces based on the myproject.zip attachment.

        Show
        Matt Raible added a comment - Attached a patch for converting AppFuse to use PrimeFaces based on the myproject.zip attachment.
        Hide
        Gilberto C Andrade added a comment -

        I can't Edit Profile or Edit/Add user either. I've reported it here[1], but haven't had more time to work on it. As I said the exception is too generic to discovery the root of the problem.

        [1] http://appfuse.547863.n4.nabble.com/JSF-2-0-replace-myfaces-and-tomahawk-tp4655927p4655946.html

        Show
        Gilberto C Andrade added a comment - I can't Edit Profile or Edit/Add user either. I've reported it here [1] , but haven't had more time to work on it. As I said the exception is too generic to discovery the root of the problem. [1] http://appfuse.547863.n4.nabble.com/JSF-2-0-replace-myfaces-and-tomahawk-tp4655927p4655946.html
        Hide
        Ahmed CHKIOUA added a comment -

        Hi All,

        It seems that the pach "primefaces.patch" doesn't match with the attached myproject.zip.

        Matt,
        Could you please specify/confirm from which version the patch was created?

        Thanks

        Show
        Ahmed CHKIOUA added a comment - Hi All, It seems that the pach "primefaces.patch" doesn't match with the attached myproject.zip. Matt, Could you please specify/confirm from which version the patch was created? Thanks
        Hide
        Matt Raible added a comment -

        I just committed my initial pass at integrating Mojarra and PrimeFaces into AppFuse. Will enter individual issues for problems I found during migration. Here's a brief summary:

        1. Have to add listener in web.xml

        [INFO] [talledLocalContainer] Feb 02, 2013 10:39:52 PM org.apache.catalina.core.StandardContext addApplicationListener
        [INFO] [talledLocalContainer] INFO: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.

        2. Servlet 2.3 is in WEB-INF/lib

        [INFO] [talledLocalContainer] INFO: validateJarFile(/Users/mraible/dev/appfuse/web/jsf/target/tomcat7x/container/webapps/appfuse-jsf-2.2.2-SNAPSHOT/WEB-INF/lib/servlet-api-2.3.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class

        3. Rendering delete button on userForm
        4. .xhtml is in URLs instead of clean URLs
        5. bootstrap theme 404s on images

        [INFO] [talledLocalContainer] Feb 02, 2013 10:40:25 PM com.sun.faces.application.resource.ResourceHandlerImpl logMissingResource
        [WARNING] [talledLocalContainer] WARNING: JSF1064: Unable to find or serve resource, images/ui-bg_highlight-hard_70_000000_1x100.png, from library, primefaces-bootstrap.

        6. file upload doesn't work with webtest
        7. setCheckbox doesn't work with webtest

        Show
        Matt Raible added a comment - I just committed my initial pass at integrating Mojarra and PrimeFaces into AppFuse. Will enter individual issues for problems I found during migration. Here's a brief summary: 1. Have to add listener in web.xml [INFO] [talledLocalContainer] Feb 02, 2013 10:39:52 PM org.apache.catalina.core.StandardContext addApplicationListener [INFO] [talledLocalContainer] INFO: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored. 2. Servlet 2.3 is in WEB-INF/lib [INFO] [talledLocalContainer] INFO: validateJarFile(/Users/mraible/dev/appfuse/web/jsf/target/tomcat7x/container/webapps/appfuse-jsf-2.2.2-SNAPSHOT/WEB-INF/lib/servlet-api-2.3.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class 3. Rendering delete button on userForm 4. .xhtml is in URLs instead of clean URLs 5. bootstrap theme 404s on images [INFO] [talledLocalContainer] Feb 02, 2013 10:40:25 PM com.sun.faces.application.resource.ResourceHandlerImpl logMissingResource [WARNING] [talledLocalContainer] WARNING: JSF1064: Unable to find or serve resource, images/ui-bg_highlight-hard_70_000000_1x100.png, from library, primefaces-bootstrap. 6. file upload doesn't work with webtest 7. setCheckbox doesn't work with webtest

          People

          • Assignee:
            Matt Raible
            Reporter:
            Gilberto C Andrade
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development