2 Replies Latest reply on Apr 11, 2011 11:47 AM by echavet

    Ho to deal with a code correction in richfaces-ui

    echavet

      Hi every one,

       

      I'm not sure this is the right thing to do in my case but I am trying to compile a new version of richfaces based on 3.3.3.Final but with some corrections on the menu-component behavior.

       

      First, here is why I intend to change the version number:

       

      The menu-component behavior does not satisfy me. I have 3 submenu-levels and my users can't manage to go from one level(parent) to the next one(child) easily. Once an item is selected on a popup level, going to the next level must be done with the constraint to maintain the mouse pointer on the item zone during all his way/path to the next popup menu. As in a game, if you touch the top or below item you lose: the popup is immediately closed!

       

      I think this is a bug because it seems the js code intented to do this properly as there is a "hideDelay" variable in the js but it does not work.

      There is two main solutions. Either the child popup closing timout has to be really effective and configurable. Or the next level popup opening has to happen on the "click" event and not on the mouseover event as iti is by now.

       

      I have chosen the click method which was the easiest way to modify the menu.js code.

       

       

      So I've downloaded the sources. I have modified the menu.js file but now I don't know how to manage my change.

      I could simply increment the richfaces-ui version. But I don't understand how  to manage the version in the pom.xml files before compiling.

       

      So my questions are:

       

      How can I change the version?

      Or if any other way, how can I extend the menu-component?

       

      The edited file is the menu.js (located in the richfaces-ui-3.3.3.Final/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts directory).

       

       

      Thanks for advice.

      Eric Chavet

        • 1. Ho to deal with a code correction in richfaces-ui
          nbelaevski
          • 2. Ho to deal with a code correction in richfaces-ui
            echavet

            Thanks

             

            Ahhhh!!! :  "Update project version in all *.xml; *.sh; *.bat files manually. E.g. replace 3.3.1-SNAPSHOT with 3.3.1.BETA1"

             

            Actually I've just replaced the version number in the pom.xml of the sub project "menu-component": it was "3.3.3.Final" and I've put "3.3.3.custom".

             

            Then I have compiled only the "menu-component" (with my modifications).

            Then I have modified my project pom to exclude menu-compoment dependency in the richfaces-ui dependency. And I have added the dependency menu-component with my "3.3.3.custom" version.

             

            And it worked well.

             

            Thanks again for your answer.

             

            For info: the bug in the menu.js only happens when the items all have a sub-menu. Which can't be tested on the Exadel demo because this case does not exist.

            The problem is that a mouseover event on an item that does have itself a submenu, immediatly closes the previously opened sub-menu without any closing timeout consideration!

             

            Eric