Package com.smartgwt.client.data

Examples of com.smartgwt.client.data.Criterion


        endpoint.setPickListFilterCriteriaFunction(new FormItemCriteriaFunction(){
      @Override
      public AdvancedCriteria getCriteria(FormItemFunctionContext itemContext) {
        String value = getEndpoint();
        AdvancedCriteria criteria = new AdvancedCriteria(OperatorId.OR, new Criterion[]{
            new Criterion(Endpoints.KEY_TITLE, OperatorId.ICONTAINS, value),
            new Criterion(Endpoints.KEY_ENDPOINT, OperatorId.ICONTAINS, value)
        });
        return criteria;
      }});

        setFields(endpoint);
View Full Code Here


        IButton searchButton = new IButton("Filter");
        searchButton.setAutoFit(true);
        searchButton.addClickHandler(new ClickHandler() {
            @Override
            public void onClick(ClickEvent event) {
                Criterion criteria = rangeItem.getCriterion();               
                grid1.fetchData(criteria);
            }
        });
        layout.addMember(searchButton);
        layout.addMember(grid1);

        // ---------------------------------------------------------------------------------------
        // Inline FilterEditor Example (MiniDateRangeItem)

        Label filterEditorLabel = new Label("FilterEditor (MiniDateRangeItem)");
        filterEditorLabel.setWidth(595);
        filterEditorLabel.setBaseStyle("exampleSeparator");
        filterEditorLabel.setHeight(25);
        layout.addMember(filterEditorLabel);

        // Create a ListGrid displaying data from the worldDS and also displaying a FilterEditor
        final ListGrid grid2 = new ListGrid();
        grid2.setWidth(595);
        grid2.setHeight(200);
        grid2.setDataSource(WorldXmlDS.getInstance());
        grid2.setAutoFetchData(true);
        grid2.setShowFilterEditor(true);
        layout.addMember(grid2);

        layout.addDrawHandler(new DrawHandler() {
            @Override
            public void onDraw(DrawEvent event) {
                Criterion criteria = rangeItem.getCriterion();
                grid1.fetchData(criteria);
            }
        });

        return layout;
View Full Code Here

        countryGrid.setAutoFetchData(true);
        countryGrid.setShowFilterEditor(true);
        countryGrid.setAllowFilterExpressions(true);

        AdvancedCriteria initialCriteria = new AdvancedCriteria(OperatorId.AND, new Criterion[]{
                new Criterion("countryName", OperatorId.INOT_CONTAINS, "i"),
                new Criterion("capital", OperatorId.BETWEEN_INCLUSIVE, "A", "F"),

                new AdvancedCriteria(OperatorId.OR, new Criterion[]{
                        new Criterion("population", OperatorId.LESS_THAN, 1000000),
                        new Criterion("population", OperatorId.GREATER_THAN, 100000000)
                })
        });

        countryGrid.setInitialCriteria(initialCriteria);
View Full Code Here

TOP

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

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.