Package com.smartgwt.client.data.fields

Examples of com.smartgwt.client.data.fields.DataSourceIntegerField


    @Override
    protected List<DataSourceField> addDataSourceFields() {
        List<DataSourceField> fields = super.addDataSourceFields();

        DataSourceIntegerField id = new DataSourceIntegerField("id", MSG.common_title_id());
        id.setPrimaryKey(true);
        fields.add(id);

        DataSourceTextField resourceName = new DataSourceTextField("resourceName", MSG.common_title_resource());
        fields.add(resourceName);
View Full Code Here


        preferecesGrid.setFields(name, viewState);
        preferecesGrid.setAutoFetchData(true);

        //create a "preferences" DataSource to bind to SelectItem and Preferences ListGrid
        final DataSource preferencesDS = new DataSource();
        DataSourceIntegerField pkField = new DataSourceIntegerField("pk");
        pkField.setHidden(true);
        pkField.setPrimaryKey(true);

        DataSourceTextField preferenceField = new DataSourceTextField("name", "Name");
        DataSourceTextField stateField = new DataSourceTextField("viewState", "View State");
        preferencesDS.setFields(pkField, preferenceField, stateField);
        preferencesDS.setClientOnly(true);
View Full Code Here

       
        IntegerRangeValidator integerRangeValidator = new IntegerRangeValidator();
        integerRangeValidator.setMin(1);
        integerRangeValidator.setMax(20);
       
        DataSourceIntegerField dsIntegerField = new DataSourceIntegerField("intField");
        dsIntegerField.setTitle("Integer");
        dsIntegerField.setValidators(integerRangeValidator);
       
        dataSource.setFields(dsIntegerField);
       
        final DynamicForm form = new DynamicForm();
        form.setWidth(300);
View Full Code Here

     
    public Canvas getViewPanel() {
     
        DataSource dataSource = new DataSource();
       
        DataSourceIntegerField dsIntegerField = new DataSourceIntegerField("intField");
        dsIntegerField.setTitle("Integer");
       
        dataSource.setFields(dsIntegerField);
       
        final DynamicForm form = new DynamicForm();
        form.setWidth(300);
View Full Code Here

        preferecesGrid.setFields(name, viewState);
        preferecesGrid.setAutoFetchData(true);

        //create a "preferences" DataSource to bind to SelectItem and Preferences ListGrid
        final DataSource preferencesDS = new DataSource();
        DataSourceIntegerField pkField = new DataSourceIntegerField("pk");
        pkField.setHidden(true);
        pkField.setPrimaryKey(true);

        DataSourceTextField preferenceField = new DataSourceTextField("name", "Name");
        DataSourceTextField stateField = new DataSourceTextField("viewState", "View State");
        preferencesDS.setFields(pkField, preferenceField, stateField);
        preferencesDS.setClientOnly(true);
View Full Code Here

        thumbnail.setWidth(150);
        thumbnail.setImageHeight("imageHeight");
        thumbnail.setImageWidth("imageWidth");
        thumbnail.setValueXPath("Thumbnail/Url");

        DataSourceIntegerField imageWidth = new DataSourceIntegerField("imageWidth");
        imageWidth.setValueXPath("Thumbnail/Width");
        imageWidth.setAttribute("hidden", true);

        DataSourceIntegerField imageHeight = new DataSourceIntegerField("imageHeight");
        imageHeight.setValueXPath("Thumbnail/Height");
        imageHeight.setAttribute("hidden", true);

        DataSourceField title = new DataSourceField("Title", FieldType.TEXT);
        DataSourceField summary = new DataSourceField("Summary", FieldType.TEXT);

        DataSourceLinkField fullImage = new DataSourceLinkField("link", "Full Image");
View Full Code Here

        setID(id);
        setTitleField("Name");
        setRecordXPath("/List/employee");
        DataSourceTextField nameField = new DataSourceTextField("Name", "Name", 128);

        DataSourceIntegerField employeeIdField = new DataSourceIntegerField("EmployeeId", "Employee ID");
        employeeIdField.setPrimaryKey(true);
        employeeIdField.setRequired(true);

        DataSourceIntegerField reportsToField = new DataSourceIntegerField("ReportsTo", "Manager");
        reportsToField.setRequired(true);
        reportsToField.setForeignKey(id + ".EmployeeId");
        reportsToField.setRootValue("1");

        DataSourceTextField jobField = new DataSourceTextField("Job", "Title", 128);
        DataSourceTextField emailField = new DataSourceTextField("Email", "Email", 128);
        DataSourceTextField statusField = new DataSourceTextField("EmployeeStatus", "Status", 40);
        DataSourceFloatField salaryField = new DataSourceFloatField("Salary", "Salary");
View Full Code Here

        thumbnail.setWidth(150);
        thumbnail.setImageHeight("imageHeight");
        thumbnail.setImageWidth("imageWidth");
        thumbnail.setValueXPath("yahoo:Thumbnail/yahoo:Url");

        DataSourceIntegerField imageWidth = new DataSourceIntegerField("imageWidth");
        imageWidth.setValueXPath("yahoo:Thumbnail/yahoo:Width");
        imageWidth.setAttribute("hidden", true);

        DataSourceIntegerField imageHeight = new DataSourceIntegerField("imageHeight");
        imageHeight.setValueXPath("yahoo:Thumbnail/yahoo:Height");
        imageHeight.setAttribute("hidden", true);

        DataSourceField title = new DataSourceField("Title", FieldType.TEXT);
        DataSourceField summary = new DataSourceField("Summary", FieldType.TEXT);

        DataSourceLinkField fullImage = new DataSourceLinkField("link", "Full Image");
View Full Code Here

        thumbnail.setWidth(150);
        thumbnail.setImageHeight("imageHeight");
        thumbnail.setImageWidth("imageWidth");
        thumbnail.setValueXPath("Thumbnail/Url");

        DataSourceIntegerField imageWidth = new DataSourceIntegerField("imageWidth");
        imageWidth.setValueXPath("Thumbnail/Width");
        imageWidth.setAttribute("hidden", true);

        DataSourceIntegerField imageHeight = new DataSourceIntegerField("imageHeight");
        imageHeight.setValueXPath("Thumbnail/Height");
        imageHeight.setAttribute("hidden", true);

        DataSourceField title = new DataSourceField("Title", FieldType.TEXT);
        DataSourceField summary = new DataSourceField("Summary", FieldType.TEXT);

        DataSourceLinkField fullImage = new DataSourceLinkField("link", "Full Image");
View Full Code Here

        DataSourceTextField scientificName = new DataSourceTextField("scientificName", "Scientific Name");
        scientificName.setRequired(true);
        scientificName.setPrimaryKey(true);

        DataSourceIntegerField lifeSpanField = new DataSourceIntegerField("lifeSpan", "Life Span");

        DataSourceTextField statusField = new DataSourceTextField("status", "Endangered Status");
        statusField.setValueMap("Threatened", "Endangered", "Not Endangered", "Not currently listed",
             "May become threatened","Protected");
View Full Code Here

TOP

Related Classes of com.smartgwt.client.data.fields.DataSourceIntegerField

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.