3 Replies Latest reply on Mar 10, 2008 4:35 PM by Jens Mueller

    Action for dynamic PanelMenuItem

    Jens Mueller Novice

      Does anyone know how to get the Action(-Expression) on an Item of a dynamic PanelMenu? I don't need any method-bindings, just an outcome string in order to handle navigation in the faces-context.xml
      Cheers,
      janson

        • 1. Re: Action for dynamic PanelMenuItem
          Jens Mueller Novice

          before i forget: currently i'm using smth like "menuItem_1_1.setAction(new SimpleActionMethodBinding("goanywhere"));" which is apparently working but is marked as deprecated...

          • 2. Re: Action for dynamic PanelMenuItem
            Ilya Shaikovsky Master

            just question for JSF documentation ;)

            HtmlCommandButton button = new HtmlCommandButton();
            MethodExpression expression = FacesContext.getCurrentInstance().getApplication().getExpressionFactory().createMethodExpression(arg0, arg1, arg2, arg3)
            button.setActionExpression()
            


            • 3. Re: Action for dynamic PanelMenuItem
              Jens Mueller Novice

              thanks for your reply. my problem with this method is that jboss 4.2.0 isn't shipped with the necessary javax.faces.el classes such as the MethodExpression. When i try to added this libs manually i get the following exception:
              Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
              java.lang.LinkageError: loader constraints violated when linking javax/el/ExpressionFactory class
              no idea whether eclipse can't handle it or is it just me being too stupid...