6 Replies Latest reply on Sep 9, 2009 5:36 AM by Nick Belaevski

    Programmatically set onclick() at HtmlMenuItem

    Jan Groth Novice


      what I like to do is to set a rather complex EL expression as onClick() at an HtmlMenuItem.

      It works fine with simple expressions, but is not working with a more complex term:

      HtmlMenuItem mi1 ...
      HtmlMenuItem mi2 ...
      mi1.setOnclick("alert('hello')"); // .. working
      mi1.setOnclick("#{rich:component('myPanel')}.show();return false"); // .. not working

      I think that it's the EL expression which causes the troubles, but as the method takes an String argument and is not ... eh ... over-documented, I dont have a clue.

      Can anyone help me out?

      Many thanks,