Package org.geoserver.web.wicket

Examples of org.geoserver.web.wicket.GeoServerTablePanel$SelectionModel


        DataStoreInfo store = getCatalog().getStoreByName(MockData.CDF_PREFIX, DataStoreInfo.class);
        tester.startPage(new NewLayerPage(store.getId()));
       
        tester.assertRenderedPage(NewLayerPage.class);
        assertNull(tester.getComponentFromLastRenderedPage("selector"));
        GeoServerTablePanel table = (GeoServerTablePanel) tester.getComponentFromLastRenderedPage(TABLE_PATH);
        assertEquals(getCatalog().getResourcesByStore(store, FeatureTypeInfo.class).size(), table.getDataProvider().size());
    }
View Full Code Here


        super(id);
        this.demo = demo;

        final LayerProvider layerProvider = new LayerProvider(demo);

        GeoServerTablePanel layerTable =
            new GeoServerTablePanel<LayerInfo>("layer.table", layerProvider) {
                @Override
                public Component getComponentForProperty(
                    String id, IModel value, Property<LayerInfo> property
                ) {
View Full Code Here

        tester.startPage(new LayerPage());
        tester.assertRenderedPage(LayerPage.class);
        tester.assertNoErrorMessage();
       
        // check it has two layers
        GeoServerTablePanel table = (GeoServerTablePanel) tester.getComponentFromLastRenderedPage("table");
        assertEquals(2, table.getDataProvider().size());
        List<String> workspaces = getWorkspaces(table);
        assertTrue(workspaces.contains("cite"));
        assertTrue(workspaces.contains("gs"));
       
        // sort on workspace once (top to bottom)
        String wsSortPath = "table:listContainer:sortableLinks:1:header:link";
        tester.clickLink(wsSortPath, true);
        workspaces = getWorkspaces(table);
        assertEquals("cite", workspaces.get(0));
        assertEquals("gs", workspaces.get(1));
       
        // sort on workspace twice (bottom to top)
        tester.clickLink(wsSortPath, true);
        workspaces = getWorkspaces(table);
        assertEquals("gs", workspaces.get(0));
        assertEquals("cite", workspaces.get(1));
       
        // select second layer
        String checkBoxPath = "table:listContainer:items:6:selectItemContainer:selectItem";
        CheckBox selector = (CheckBox) tester.getComponentFromLastRenderedPage(checkBoxPath);
        // dirty trick, how to set a form component value without a form
        tester.getServletRequest().setParameter(selector.getInputName(), "true");
        tester.executeAjaxEvent(selector, "onclick");
        assertEquals(1, table.getSelection().size());
        LayerInfo li = (LayerInfo) table.getSelection().get(0);
        assertEquals("cite", li.getResource().getStore().getWorkspace().getName());
    }
View Full Code Here

        DataStoreInfo store = getCatalog().getStoreByName(MockData.CDF_PREFIX, DataStoreInfo.class);
        tester.startPage(new NewLayerPage(store.getId()));
       
        tester.assertRenderedPage(NewLayerPage.class);
        assertNull(tester.getComponentFromLastRenderedPage("selector"));
        GeoServerTablePanel table = (GeoServerTablePanel) tester.getComponentFromLastRenderedPage(TABLE_PATH);
        assertEquals(getCatalog().getResourcesByStore(store, FeatureTypeInfo.class).size(), table.getDataProvider().size());
    }
View Full Code Here

TOP

Related Classes of org.geoserver.web.wicket.GeoServerTablePanel$SelectionModel

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.