2 Replies Latest reply on Feb 27, 2012 7:47 AM by Lukáš Fryč

    Add Richfaces 4 as  a module to JBoss AS 7.1

    Ste Gr Newbie

      Hello everyone,

       

      based on this topic on the richfaces forums I want to ask you, whether richfaces 4 could be added as a module to JBoss 7.1.

       

      Radmin Hanus (see other topic) said, that richfaces could/should only be deployed with the application, because some resources (taglibs, ...) will be expected in WEB-INF/lib/richfaces-*.jar.

      Lukáš Fryč (again other topic) pointed out, that Mojarra itself is a JSF library with taglibs that already exists as a module in JBoss.

       

       

      So: Is it possible to add richfaces 4 as a module or would this require modifications of the richfaces code?

       

       

      Thanks in advance.

        • 1. Re: Add Richfaces 4 as  a module to JBoss AS 7.1
          guinotphil Apprentice

          I don't know about Richfaces 4, but I managed to use Richfaces 3 as a module and actually I needed to patch a few things:

           

          a) In richfaces-api-3.3.3.Final and richfaces-impl-3.3.3.Final, the static Maps

          * org.ajax4jsf.Messages.bundles

          * org.ajax4jsf.context.AjaxContext.ajaxContextClasses

          * org.ajax4jsf.resource.InternetResourceBuilder.instances

          * org.richfaces.skin.SkinFactory.instances

          * org.ajax4jsf.util.ServicesUtils._services

          * org.ajax4jsf.util.ServicesUtils._instances

          must be Weak

           

          b) In richfaces-impl-3.3.3.Final, the method org.ajax4jsf.resource.ResourceBuilderImpl.createResource(Object, String) must add a failback to load the class from the Current Thread's class loader.

           

          c) In addition, using JSF 1.2, I had to deploy Facelets 1.1.15 as a module and needed to patch MetaRulesetImpl to set the attributes map as a WeakHashMap<Class<?>, WeakReference<MetadataTarget>>.

          • 2. Re: Add Richfaces 4 as  a module to JBoss AS 7.1
            Lukáš Fryč Master

            Hi guys,

             

            just for reference, here is the feature request for distributing RichFaces 4 as AS7 module, please vote there or comment if you would like to grab that issue and implement it:

             

            https://issues.jboss.org/browse/RF-12008

             

            Thanks,

             

            ~ Lukas