Package org.wicketstuff.yui.markup.html.menu2.action

Examples of org.wicketstuff.yui.markup.html.menu2.action.AjaxLinkAction


 

  private void initMenuGroup1() {
    AbstractYuiMenuItem mi = null;
   
    YuiMenuGroup menuGroup = new YuiMenuGroup( "groupMenu1", "groupMenu1" );
    YuiMenu menu1 = menuGroup.addMenu();


    menu1.addMenuItem(new TestAction("M1 : L1"));
    menu1.addMenuItem(new TestAction("M1 : L2"));
    mi = menu1.addMenuItem(new TestAction("M1 : L3"));
    menu1.addMenuItem(new TestAction("M1 : L4"));
    menu1.addMenuItem(new TestAction("M1 : L5"));
   
    YuiMenu subMenu = mi.newSubMenu( "gm_subMenu1" );
    subMenu.addMenuItem(new TestAction("Label 1"));
    subMenu.addMenuItem(new TestAction("Label 2"));
   
    YuiMenu menu2 = menuGroup.addMenu();
    menu2.addMenuItem(new TestAction("M2 : L1"));
    menu2.addMenuItem(new TestAction("M2 : L2"));
    menu2.addMenuItem(new TestAction("M2 : L3"));
    menu2.addMenuItem(new TestAction("M2 : L4"));
    menu2.addMenuItem(new TestAction("M2 : L5"));
View Full Code Here


  }
 
  private void initMenuGroup2() {
    AbstractYuiMenuItem mi = null;
   
    YuiMenuGroup menuGroup = new YuiMenuGroup( "groupMenu2", "groupMenu2" );
    YuiMenu menu1 = menuGroup.addMenu("Group 1");


    menu1.addMenuItem(new TestAction("M1 : L1"));
    menu1.addMenuItem(new TestAction("M1 : L2"));
    mi = menu1.addMenuItem(new TestAction("M1 : L3"));
    menu1.addMenuItem(new TestAction("M1 : L4"));
    menu1.addMenuItem(new TestAction("M1 : L5"));
   
    YuiMenu subMenu = mi.newSubMenu( "gm_subMenu2" );
    subMenu.addMenuItem(new TestAction("Label 1"));
    subMenu.addMenuItem(new TestAction("Label 2"));
   
    YuiMenu menu2 = menuGroup.addMenu("Group 2");
    menu2.addMenuItem(new TestAction("M2 : L1"));
    menu2.addMenuItem(new TestAction("M2 : L2"));
    menu2.addMenuItem(new TestAction("M2 : L3"));
    menu2.addMenuItem(new TestAction("M2 : L4"));
    menu2.addMenuItem(new TestAction("M2 : L5"));
View Full Code Here

    final YuiMenu subMenu2 = secondMenu.newSubMenu("mb_secondMenu");
    subMenu2.setOutputMarkupId(true);
    subMenu2.addMenuItem(new TestAction("M2 : L1"));

    final YuiMenuItem m2L2 = new YuiMenuItem(new TestAction("M2 : L2"));
    subMenu2.addMenuItem(m2L2);

    subMenu2.addMenuItem(new AjaxLinkAction("M2 : L3 (Ajax) - toggles M2 : L2")
    {
      @Override
      public void onClick(AjaxRequestTarget target)
      {
        MenuBar2Page.this.info(getName().getObject());
        m2L2.setDisabled(!m2L2.isDisabled());
        m2L2.setChecked(!m2L2.isDisabled());
        m2L2.setSelected(m2L2.isChecked());
        target.addComponent(feedback);
        target.addComponent(mb);
      }
    });
    subMenu2.addMenuItem(new TestAction("M2 : L4"));
View Full Code Here

    subMenu2.addMenuItem(new TestAction("M2 : L1"));

    final YuiMenuItem m2L2 = new YuiMenuItem(new TestAction("M2 : L2"));
    subMenu2.addMenuItem(m2L2);

    subMenu2.addMenuItem(new AjaxLinkAction("M2 : L3 (Ajax) - toggles M2 : L2")
    {
      @Override
      public void onClick(AjaxRequestTarget target)
      {
        MenuBar2Page.this.info(getName().getObject());
View Full Code Here

    add( new FeedbackPanel( "feedback"));
   
     
    YuiContextMenu testMenu1 = new YuiContextMenu( "testMenu1" );
   
    testMenu1.add( new MenuItem( "Cut", new TestAction( "Cut")));
    testMenu1.add( new MenuItem( "Copy", new TestAction( "Copy")));
    testMenu1.add( new MenuItem( "Paste", new TestAction( "Paste") ));
   
    YuiContextMenu testMenu2 = new YuiContextMenu( "testMenu2" );

    testMenu2.add( new MenuItem( "Yellow", new ChangeColorAction( "Yellow") ));
    testMenu2.add( new MenuItem( "Green", new ChangeColorAction( "Green") ));
    testMenu2.add( new MenuItem( "Blue", new ChangeColorAction( "Blue") ));
   
   
    YuiContextMenuBehavior cmBehavior = new YuiContextMenuBehavior(testMenu1, testMenu2);
   
    WebMarkupContainer markup =new WebMarkupContainer( "panel" );
View Full Code Here

   */
  public ContextMenu2TreePage(final PageParameters parameters) {

    final YuiContextMenu nodeMenu = new YuiContextMenu("floorMenu");

    nodeMenu.add(new MenuItem("addNode", new AddNodeAction()));
    nodeMenu.add(new MenuItem("moveNodeUp", new MoveNodeUpAction()));
    nodeMenu.add(new MenuItem("moveNodeDown", new MoveNodeDownAction()));
   
   
    WebMarkupContainer treeContainer = new WebMarkupContainer( "treeContextMenu");
   
    add( treeContainer );
View Full Code Here

  public ContextMenu2Page() {
   
    add( new FeedbackPanel( "feedback"));
   
     
    YuiContextMenu testMenu1 = new YuiContextMenu( "testMenu1" );
   
    testMenu1.add( new MenuItem( "Cut", new TestAction( "Cut")));
    testMenu1.add( new MenuItem( "Copy", new TestAction( "Copy")));
    testMenu1.add( new MenuItem( "Paste", new TestAction( "Paste") ));
   
    YuiContextMenu testMenu2 = new YuiContextMenu( "testMenu2" );

    testMenu2.add( new MenuItem( "Yellow", new ChangeColorAction( "Yellow") ));
    testMenu2.add( new MenuItem( "Green", new ChangeColorAction( "Green") ));
    testMenu2.add( new MenuItem( "Blue", new ChangeColorAction( "Blue") ));
   
   
    YuiContextMenuBehavior cmBehavior = new YuiContextMenuBehavior(testMenu1, testMenu2);
   
    WebMarkupContainer markup =new WebMarkupContainer( "panel" );
View Full Code Here

   * @param parameters
   *            Page parameters
   */
  public ContextMenu2TreePage(final PageParameters parameters) {

    final YuiContextMenu nodeMenu = new YuiContextMenu("floorMenu");

    nodeMenu.add(new MenuItem("addNode", new AddNodeAction()));
    nodeMenu.add(new MenuItem("moveNodeUp", new MoveNodeUpAction()));
    nodeMenu.add(new MenuItem("moveNodeDown", new MoveNodeDownAction()));
   
   
    WebMarkupContainer treeContainer = new WebMarkupContainer( "treeContextMenu");
   
    add( treeContainer );
View Full Code Here

    testMenu2.add( new MenuItem( "Yellow", new ChangeColorAction( "Yellow") ));
    testMenu2.add( new MenuItem( "Green", new ChangeColorAction( "Green") ));
    testMenu2.add( new MenuItem( "Blue", new ChangeColorAction( "Blue") ));
   
   
    YuiContextMenuBehavior cmBehavior = new YuiContextMenuBehavior(testMenu1, testMenu2);
   
    WebMarkupContainer markup =new WebMarkupContainer( "panel" );
    markup.setOutputMarkupId(true);
   
    cmBehavior.applyAttributes( markup, testMenu1, new Model( "123") );
   
    subPanel = new WebMarkupContainer( "subPanel" );
    subPanel.setOutputMarkupId(true);
    cmBehavior.applyAttributes( subPanel, testMenu2, new Model( "777") );
    markup.add( subPanel );

   
    add( markup );
    markup.add( cmBehavior );
View Full Code Here

      public void onClick() {
        tree.getTreeState().collapseAll();
      }
    });
   
    cmBehavior = new YuiContextMenuBehavior(nodeMenu );
    treeContainer.add(cmBehavior);

  }
View Full Code Here

TOP

Related Classes of org.wicketstuff.yui.markup.html.menu2.action.AjaxLinkAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.