Package com.ponysdk.ui.server.basic

Examples of com.ponysdk.ui.server.basic.PSuggestBox.addSelectionHandler()


        final PSuggestBox suggestBox = new PSuggestBox();
        suggestBox.setLimit(10);

        final PMultiWordSuggestOracle suggestOracle = (PMultiWordSuggestOracle) suggestBox.getSuggestOracle();
        suggestBox.addSelectionHandler(new PSelectionHandler<PSuggestion>() {

            @Override
            public void onSelection(final PSelectionEvent<PSuggestion> event) {
                final String msg = "Selected item : " + event.getSelectedItem().getReplacementString();
                UIContext.getRootEventBus().fireEvent(new DemoBusinessEvent(msg));
View Full Code Here


                suggestBox1.getSuggestOracle().add("Suggest 1");
                suggestBox1.getSuggestOracle().add("Suggest 2");
                suggestBox1.getSuggestOracle().add("Suggest 3");
                suggestBox1.getSuggestOracle().add("Suggest 4");
                suggestBox1.ensureDebugId("suggestBox1");
                suggestBox1.addSelectionHandler(eventsListener);
                PRootPanel.get().add(suggestBox1);
                register(suggestBox1);
            }
        });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.