1 2 Previous Next 18 Replies Latest reply on Feb 1, 2012 12:01 PM by pjotrovsky

    Context menu component in RF 4.X

    blabno

      I've created new component, the context menu (I don't know why it hasn't been migrated from RF3).

       

      Enjoy.

       

      Demo, download and subversion address are here.

        • 1. Re: Context menu component in RF 4.X
          bleathem

          Great, thanks for pointing this out Bernard!

           

          Aplogies to the community for not getting this in for 4.1, but I'd like to remind everyone that we did add 4 components in the richFaces 4.1 release:

          1. rich:editor
          2. rich:notify
          3. rich:picklist
          4. rich:orderingList

          along with a number of new features including mobile compatibility, resource packaging, and push improvements.

           

          The context menu didn't make our shortlist for 4.1, but we'll work at getting this included as a RichFaces component post 4.1.0.Final.

          • 2. Re: Context menu component in RF 4.X
            healeyb

            Bernard, great news, I'll use this to replace the messy solution I knocked up with a jquery ui contextMenu

            and loads of javascript glue (& jsFunction etc...).

             

            One question I'd like to ask you is whether or not it is possible to use contextMenu to right click in a

            schedule (the sandbox component) to perform a server side action on the day or time slot you've clicked

            over? I see the onitemmouseover event, but wasn't totally sure what information is available in the 'item'

            callback parameter. So I imagine it's possible somehow, is there a very easy way to do this?

             

            Thanks.

            Brendan.

            • 3. Re: Context menu component in RF 4.X
              blabno

              Brendan, I think there is no very easy way to achieve what you need. I suggest you use ondayclick callback to send info (which day is selected) to server via jsFunction. Attaching menu should be easy.

              • 4. Re: Context menu component in RF 4.X
                hedes

                Hello Bernard

                many thanks for your job. A question about context menu : i have implemented it with the jquery one, mixing it with Richfaces 4.0. It's working fine on PC/Windows but not on Apple/Mac. Did you test your context menu on Apple/Mac ?

                Thank you

                Hery

                • 5. Re: Context menu component in RF 4.X
                  blabno

                  Hi Hery,

                  I don't understand this sentence "i have implemented it with the jquery one". Do you mean you use your own plugin?

                  I haven't tested it on Mac because I don't have one, so I would be very thankful for any feedback and patches.

                  • 6. Re: Context menu component in RF 4.X
                    hedes

                    Sorry for my poor english : i use the contextual menu plugin of JQuery. It is working fine with richfaces on PC/Windows but not on Apple/MacOs. My customer mainly uses Apple/MacOS.

                    • 7. Re: Context menu component in RF 4.X
                      healeyb

                      I suppose that short of going out and buying a mac the best you could do is to download the safari

                      for PC browser:

                       

                      http://www.apple.com/safari/download/

                       

                      p.s. Bernard - thanks for pointing out the ondateselect event, I don't know how I didn't notice it. This

                            is all I need.

                      • 8. Re: Context menu component in RF 4.X
                        hedes

                        yes i have already downloaded Safari for PC and... it's working fine . The issue is about the right click: it seems to be not detected on Apple/MacOs.  I do not want to buy a Mac just for a contextual menu !

                        • 9. Re: Context menu component in RF 4.X
                          healeyb

                          Would you be able to give your contextMenu a quick test in google chrome? I think both

                          safari & chrome are webkit browsers, it would be interesting to see what happens.

                          • 10. Re: Context menu component in RF 4.X
                            hedes

                            I test the contextual menu on Chrome/Firefox/IE8-9/Safari on PC: working fine everywhere on PC.

                            • 11. Re: Context menu component in RF 4.X
                              healeyb

                              Hi Bernard, I've just been giving contextmenu a try out. I'm using the 4.1.0-SNAPSHOT, and have

                              tried a simplified version of the demo:

                               

                              <cm:contextmenu id="cm" attachTo="panel" mode="ajax">

                                <rich:menuItem>Test</rich:menuItem>

                              </cm:contextmenu>

                               

                              <rich:panel id="panel>

                                <f:facet name="header">Some panel</f:facet>

                                Click here for context menu

                              </rich:panel>

                               

                              I'm running this in a page on it's own. When I right click in the panel, the browser right click menu

                              appears, then if I click elsewhere on the page the context menu appears momentarily. Alternatively

                              if I press escape the browser menu closes and the context menu appears until I click on it, or

                              elsewhere on the page. I'm running RF 4.1.0.M4. A missing @ResourceDependency maybe?

                               

                              p.s. the sandbox demo site has been down for a few days...

                               

                              Thanks,

                              Brendan.

                              • 12. Re: Context menu component in RF 4.X
                                blabno

                                Hi Brendan, sorry for late reply, i've been very busy lately. Demo site is back again, thanks for reporting. What system and browser do you run your tests on?

                                • 13. Re: Context menu component in RF 4.X
                                  healeyb

                                  Hi Bernard, I'm using Chrome 15.0.874.121 (latest version) on Windows 7. The app server is glassfish

                                  3.1.1. I think I also tested this with IE8, with the same results. My application includes jquery ui 1.8.16

                                  which includes all of the components. The jQuery version is 1.6.4, as shipped with RF 4.1.0.CR2 (which

                                  I am now using).

                                   

                                  Regards,

                                  Brendan.

                                  • 14. Re: Context menu component in RF 4.X
                                    blabno

                                    This issue exists only on windows (chrome on linux works fine). Download latest snapshot, i've fixed it today and tested on chrome on virtualbox windows xp.

                                    1 2 Previous Next