Package com.arcbees.chosen.client.gwt

Examples of com.arcbees.chosen.client.gwt.ChosenListBox


                new ChosenOptions().setMaxSelectedOptions(5));

        $("#noResultsText").as(Chosen).chosen(
                new ChosenOptions().setNoResultsText("Ooops, nothing was found:"));

        final ChosenListBox chzn = new ChosenListBox();
        chzn.addItem("item 1");
        chzn.setWidth("250px");

        RootPanel.get("updateChozen").add(chzn);

        $("#updateButton").click(new Function() {
            int i = 2;

            @Override
            public void f() {
                for (int j = 0; j < 100; j++) {
                    chzn.addItem("item " + i);
                    i++;
                }

                chzn.update();
            }
        });

        final ChosenListBox hcs = new ChosenListBox();
        hcs.setWidth("350px");
        hcs.setPlaceholderText("Navigate to...");
        hcs.setTabIndex(9);
        hcs.addItem("");
        hcs.addStyledItem("Home", "home", null);
        hcs.addGroup("ABOUT US");
        hcs.addStyledItemToGroup("Press Releases", "press", null, 0);
        hcs.addStyledItemToGroup("Contact Us", "about", null, 0);
        hcs.addGroup("PRODUCTS");
        hcs.addStyledItemToGroup("Tera-Magic", "tm", null, 0, 1);
        hcs.addStyledItemToGroup("Tera-Magic Pro", "tmpro", null, 1, 1);
        // Will be inserted before "Tera-Magic Pro" and custom-styled
        hcs.insertStyledItemToGroup("Tera-Magic Standard", "tmstd", "youAreHere", 1, 1, 1);
        RootPanel.get("hierChozenSingle").add(hcs);

        // custom filter
        ChosenOptions options = new ChosenOptions();
        options.setResultFilter(new ServerSideSimulatorResultFilter());
        final ChosenListBox serverChosenListBox = new ChosenListBox(false, options);
        RootPanel.get("serverChozen").add(serverChosenListBox);
    }
View Full Code Here


    public void onModuleLoad() {
        if (!ChosenListBox.isSupported()) {
            $("#browserWarning").show();
        }

        teamChosen = new ChosenListBox(true);
        chosenValueListBox = new ChosenValueListBox(new ChoiceRenderer());
        multipleChosenValueListBox = new MultipleChosenValueListBox(new ChoiceRenderer());

        Widget w = uiBinder.createAndBindUi(this);
View Full Code Here

TOP

Related Classes of com.arcbees.chosen.client.gwt.ChosenListBox

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.