Package com.ponysdk.ui.server.basic

Examples of com.ponysdk.ui.server.basic.PListBox$ListItem


import com.ponysdk.ui.server.form2.dataconverter.IdentityConverter;

public class StringListBoxFormField extends ListBoxFormField<String> {

    public StringListBoxFormField() {
        this(new PListBox(), IdentityConverter.STRING);
    }
View Full Code Here


        container.setWidget(0, 0, header);
        container.setWidget(1, 0, formField.render().asWidget());

        if (enableComparatorType) {
            final PListBox listBox = new PListBox(false, false);

            // for (String comparatorTypeName : ComparatorType.getNames()) {
            // listBox.addItem(comparatorTypeName);
            // }

            listBox.addItem(ComparatorType.EQ.getName());
            listBox.addItem(ComparatorType.GE.getName());
            listBox.addItem(ComparatorType.GT.getName());
            listBox.addItem(ComparatorType.LE.getName());
            listBox.addItem(ComparatorType.LT.getName());

            listBox.addChangeHandler(new PChangeHandler() {

                @Override
                public void onChange(final PChangeEvent event) {
                    final String selectedItem = listBox.getSelectedItem();
                    if (selectedItem == null) return;
                    fireComparatorTypeChange(pojoPropertyKey, ComparatorType.fromName(selectedItem));
                }
            });

            formField.addResetHandler(new ResetHandler() {

                @Override
                public void onReset() {
                    listBox.setSelectedIndex(0);
                }
            });

            container.setWidget(1, 1, listBox);
            container.getFlexCellFormatter().setColSpan(0, 0, 2);
View Full Code Here

TOP

Related Classes of com.ponysdk.ui.server.basic.PListBox$ListItem

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.