Package com.smartgwt.client.data

Examples of com.smartgwt.client.data.DataSource


            return DESCRIPTION;
        }
    }

    public Canvas getViewPanel() {
        DataSource dataSource = ItemSupplyXmlDS.getInstance();

        ListGrid listGrid = new ListGrid();
        listGrid.setWidth(600);
        listGrid.setHeight(500);
        listGrid.setCanExpandRecords(true);
View Full Code Here


            }}
    };
   
    public Canvas getViewPanel() {

        DataSource countryDataSource = getCountryDataSource();
        final ListGrid countryGrid = new ListGrid();
        countryGrid.setHiliteProperty("_hilite");

        countryGrid.setLeaveScrollbarGap(true);
View Full Code Here

    }

    private DataSource getCountryDataSource() {

        DataSource dataSource = new DataSource();

        DataSourceIntegerField pkField = new DataSourceIntegerField("pk");
        pkField.setHidden(true);
        pkField.setPrimaryKey(true);

        DataSourceTextField countryCodeField = new DataSourceTextField("countryCode", "Code");
        countryCodeField.setRequired(true);

        DataSourceTextField countryNameField = new DataSourceTextField("countryName", "Country");
        countryNameField.setRequired(true);

        DataSourceTextField capitalField = new DataSourceTextField("capital", "Capital");
        DataSourceTextField governmentField = new DataSourceTextField("government", "Government", 500);

        DataSourceBooleanField memberG8Field = new DataSourceBooleanField("member_g8", "G8");

        DataSourceTextField continentField = new DataSourceTextField("continent", "Continent");
        continentField.setValueMap("Europe", "Asia", "North America", "Australia/Oceania", "South America", "Africa");

        DataSourceDateField independenceField = new DataSourceDateField("independence", "Nationhood");
        DataSourceFloatField areaField = new DataSourceFloatField("area", "Area (km²)");
        DataSourceIntegerField populationField = new DataSourceIntegerField("population", "Population");
        DataSourceFloatField gdpField = new DataSourceFloatField("gdp", "GDP ($M)");
        DataSourceLinkField articleField = new DataSourceLinkField("article", "Info");

        dataSource.setFields(pkField, countryCodeField, countryNameField, capitalField, governmentField,
                memberG8Field, continentField, independenceField, areaField, populationField,
                gdpField, articleField);


        dataSource.setClientOnly(true);

        dataSource.setTestData(getCountryRecords());
        return dataSource;
    }
View Full Code Here

        }
    }

    public Canvas getViewPanel() {

        final DataSource dataSource = ItemSupplyXmlDS.getInstance();

        final ListGrid listGrid = new ListGrid() {
            @Override
            protected Canvas getExpansionComponent(final ListGridRecord record) {
View Full Code Here

        final DynamicForm form = new DynamicForm();
        form.setWidth(500);
        form.setNumCols(4);

        DataSource itemSupplyDS = ItemSupplyXmlDS.getInstance();
        DataSource supplyCategoryDS = SupplyCategoryXmlDS.getInstance();

        final SelectItem categoryItem = new SelectItem();
        categoryItem.setName("categoryName");
        categoryItem.setPickListWidth(210);
        categoryItem.setTitle("Category");
View Full Code Here

  private final static DataSourceServiceAsync service = GWT
      .create(DataSourceService.class);

  public static DataSource get(String className) {
    DataSource dataSource = new DataSource();
    // XJSONDataSource dataSource = new XJSONDataSource();
    String baseUrl = Window.Location.getProtocol() + "//"
        + Window.Location.getHost();
    dataSource.setDataURL(baseUrl + "/datasource/"
        + className.toLowerCase());

    return dataSource;
  }
View Full Code Here

TOP

Related Classes of com.smartgwt.client.data.DataSource

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.