Package com.ponysdk.ui.server.form.renderer

Examples of com.ponysdk.ui.server.form.renderer.ListBoxFormFieldRenderer


        return exportConfiguration;
    }

    private List<ListColumnDescriptor<Pony, ?>> initListColumnDescriptors() {

        final ListBoxFormFieldRenderer ageListBoxRenderer = new ListBoxFormFieldRenderer("Age");
        for (int i = 0; i < 30; i++)
            ageListBoxRenderer.addItem(i + " year", i);

        // ageSearchField = new FormField(ageListBoxRenderer);
        // nameSearchField = new FormField(new TextBoxBaseFormFieldRenderer("Name"));
        ageSearchField = new FormField();
        nameSearchField = new FormField();

        raceSearchFormFieldRenderer = new ListBoxFormFieldRenderer();
        raceSearchFormField = new FormField(raceSearchFormFieldRenderer);

        final List<ListColumnDescriptor<Pony, ?>> listColumnDescriptors = new ArrayList<ListColumnDescriptor<Pony, ?>>();

        final ListColumnDescriptor<Pony, String> nameColumnDescriptor = new ListColumnDescriptor<Pony, String>();
View Full Code Here


        final FormFieldRenderer field2Renderer = new TextBoxFormFieldRenderer("field2");
        final FormField field2 = new FormField(field2Renderer);
        formActivity.addFormField(field2);

        final ListBoxFormFieldRenderer field3Renderer = new ListBoxFormFieldRenderer("field3");
        field3Renderer.addItem("Choice 1", 1);
        field3Renderer.addItem("Choice 2", 2);
        field3Renderer.addItem("Choice 3", 3);
        field3Renderer.addItem("Choice 4", 4);
        final FormField field3 = new FormField(field3Renderer);
        formActivity.addFormField(field3);

        final FormFieldRenderer field4Renderer = new DateBoxFormFieldRenderer("field4");
        final FormField field4 = new FormField(field4Renderer);
View Full Code Here

        fieldPathFormField = new FormField("Field Path");
        fieldPathFormField.addValidator(new NotEmptyFieldValidator());
        addFormField(fieldPathFormField);
        addHandlerToFormField(fieldPathFormField);

        final ListBoxFormFieldRenderer typeRenderer = new ListBoxFormFieldRenderer("Field Type");
        typeRenderer.addItem(String.class.getSimpleName(), String.class);
        typeRenderer.addItem(Integer.class.getSimpleName(), Integer.class);
        typeRenderer.addItem(Long.class.getSimpleName(), Long.class);
        typeRenderer.addItem(Double.class.getSimpleName(), Double.class);
        typeRenderer.addItem(Date.class.getSimpleName(), Date.class);
        typeRenderer.addItem(Boolean.class.getSimpleName(), Boolean.class);
        fieldTypeFormField = new FormField(typeRenderer);
        fieldTypeFormField.addValidator(new NotEmptyFieldValidator());
        addFormField(fieldTypeFormField);
        addHandlerToFormField(fieldTypeFormField);
View Full Code Here

        FormField formField;
        final Class<?> fieldType = event.getDescriptorHolder().getFieldType();
        final String caption = event.getDescriptorHolder().getCaption();
        final String fieldPath = event.getDescriptorHolder().getFieldPath();
        if (fieldType.equals(Boolean.class)) {
            final ListBoxFormFieldRenderer formFieldRenderer = new ListBoxFormFieldRenderer();
            formFieldRenderer.addItem(Boolean.TRUE.toString(), Boolean.TRUE);
            formFieldRenderer.addItem(Boolean.FALSE.toString(), Boolean.FALSE);
            formField = new FormField(formFieldRenderer);
        } else if (fieldType.equals(Date.class)) {
            formField = new FormField(new DateBoxFormFieldRenderer());
        } else if (fieldType.equals(Integer.class)) {
            formField = new FormField() {
View Full Code Here

TOP

Related Classes of com.ponysdk.ui.server.form.renderer.ListBoxFormFieldRenderer

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.