ICEfaces
  1. ICEfaces
  2. ICE-10162

aceMenuBar - actions for model didn't work

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 4.0.BETA
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Icefaces 4 from trunk, rev. 42067

      Description

      At this moment menubars can't be fully programmatically created.
      AceMenuBar can be used only with model withou't actionListeners, actionExpressions and actionBinding. Actions are never called from menu items. Only 'url' works.
      The same code as below added to binding method works well.

      Failed code
      Example 1
      menuItem.addActionListener(new MethodExpressionActionListener(expressionFactory.createMethodExpression(elContext, "#{bean.testEvent}", null, new Class[] { ActionEvent.class })));

      Example 2
      menuItem.setAction(createMethodBinding("#{bean.action}"));
      MethodBinding createMethodBinding(String method) {
      Class[] args = { ActionEvent.class };
      MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding(method, args);
      return mb;

      }
      Example 3
      menuItem.addActionListener(new FooActionListener());
      public class FooActionListener implements ActionListener {

      @Override
      public void processAction(ActionEvent event) throws AbortProcessingException {
      System.out.println(event.toString());
      }

      }

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Krashan Brahmanjara
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: