Package com.smartgwt.client.widgets.events

Examples of com.smartgwt.client.widgets.events.ClickEvent


    Assert.assertTrue(page1.canShow());
    Assert.assertFalse(page2.canShow());
    Assert.assertFalse(page3.canShow());

    // click on next
    view.getNext().fireEvent(new ClickEvent(null));
    // page not validating, button states remain
    Assert.assertFalse(page1.isValid());
    Assert.assertSame(page1, wizard.getCurrentPage());
    Assert.assertFalse(view.getBack().isEnabled());
    Assert.assertTrue(view.getNext().isEnabled());
    Assert.assertTrue(view.getCancel().isEnabled());
    Assert.assertFalse(view.getFinish().isEnabled());

    Assert.assertTrue(page1.canShow());
    Assert.assertFalse(page2.canShow());
    Assert.assertFalse(page3.canShow());

    // make page1 validate
    page1.setValidate(true);
    // click on next
    view.getNext().fireEvent(new ClickEvent(null));
    Assert.assertSame(page2, wizard.getCurrentPage());
    Assert.assertTrue(view.getBack().isEnabled());
    Assert.assertTrue(view.getNext().isEnabled());
    Assert.assertTrue(view.getCancel().isEnabled());
    Assert.assertFalse(view.getFinish().isEnabled());

    Assert.assertTrue(page1.canShow());
    Assert.assertTrue(page2.canShow());
    Assert.assertFalse(page3.canShow());

    // make page2 validate
    page2.setValidate(true);
    view.getNext().fireEvent(new ClickEvent(null));
    Assert.assertSame(page3, wizard.getCurrentPage());
    Assert.assertTrue(view.getBack().isEnabled());
    Assert.assertFalse(view.getNext().isEnabled());
    Assert.assertTrue(view.getCancel().isEnabled());
    Assert.assertTrue(view.getFinish().isEnabled());
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.events.ClickEvent

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.