6 Replies Latest reply on Sep 22, 2013 3:17 PM by dabloem

    jQuery pnotify plugin version


      Hello, Richfaces 4.3.2 uses pnotify version 1.0.2. Is it possible to upgrade to use the latest version, 1.2.0 ? I know that some new features won't work with the component rich:notify, but If I use directly pnotify javascripts functions, I could get the latest updates from pnotify.


      Is it possible ?





        • 1. Re: jQuery pnotify plugin version

          Hey John,


          you can try to upgrade a library using Resource Mappong:



          You just need to find out what's a resource key for pnotify now and then place the new version in your app.


          Please let me know your findings, we could certainly upgrade.

          • 2. Re: jQuery pnotify plugin version

            Thanks for your response.

            I'm trying your idea, I found some references to jquery.pnotify.js as a ResourceDependency in NotifyRendererBase. But I'm not sure that jquery.pnotify.js is a key. Actually I don't think it is.

            Is it possible that there is no key for pnotify ? Or does every resource used by richfaces have necessarily a key ?


            If you have some ideas on where I could debug, to find out the correct key, this would help.

            I tried debugging ResourceMappingFeature and ResourceMappingConfiguration, but I did not find a key for pnotify, and nor did my property (static-resource-mappings.properties) get called.

            The content of static-resource-mappings.properties is:




            The file static-resource-mappings.properties is on my src/main/resources/META-INF/richfaces/static-resource-mappings.properties.

            And my pnotify javascript is in:



            Thanks again !





            • 3. Re: jQuery pnotify plugin version

              The resource key is composed from resourceLibrary:resourceName:



              so the correct key in properties file is:



              • 4. Re: jQuery pnotify plugin version

                Perfect, it worked !

                One last question, is there any changes on how to use this feature when the following web.xml properties are set to true ?

                org.richfaces.resourceOptimization.enabled and org.richfaces.resourceMapping.enabled


                When these properties were set to true, pnotify was bundled in a packed.js file, and I could not see any references for org.richfaces:jquery.pnotify.



                Thanks again  !



                • 5. Re: jQuery pnotify plugin version

                  In fact, resource optimization will cause a org.richfaces:jquery.pnotify to point to packed.js, but you can still rewrite it, since custom mappings will be applied later than optimization's mappings.


                  In this case you have two options:


                  a) custom version of pnotify.js will be loaded and it will actually overwrite the plugin which was registered before (from packed.js)


                  b) the (a) won't happen to work and you will need to re-build a packed.js file yourself, from scratch:


                  • 6. Re: jQuery pnotify plugin version

                    Hi John,


                    I tried the above approach, however info, error messages are still displayed as regular notifications (due to css). Did you find a solution for this, if you experienced the same...