Package org.apache.wicket.markup.repeater.data

Examples of org.apache.wicket.markup.repeater.data.DataView


       
        final WebMarkupContainer table = new WebMarkupContainer("fileTable");
        table.setOutputMarkupId(true);
        add(table);
       
        DataView fileTable = new DataView("files", fileProvider) {

            @Override
            protected void populateItem(final Item item) {
                File file = (File) item.getModelObject();
               
View Full Code Here


      }
    });

    add(new Label("selectedLabel", new PropertyModel(this, "selectedContactLabel")));

    add(new DataView("simple", new ContactDataProvider()) {
      protected void populateItem(final Item item) {
        Contact contact = (Contact) item.getModelObject();
        item.add(new ActionPanel("actions", item.getModel()));
        item.add(new Label("contactid", String.valueOf(contact.getId())));
        item.add(new Label("firstname", contact.getFirstName()));
View Full Code Here

       
        final WebMarkupContainer table = new WebMarkupContainer("fileTable");
        table.setOutputMarkupId(true);
        add(table);
       
        DataView fileTable = new DataView("files", fileProvider) {

            @Override
            protected void populateItem(final Item item) {
                File file = (File) item.getModelObject();
               
View Full Code Here

        tester.startPage(StylePage.class);
        tester.assertRenderedPage(StylePage.class);
        tester.debugComponentTrees();
        Catalog cat = getCatalog();
   
        DataView view =
            (DataView) tester.getComponentFromLastRenderedPage("table:listContainer:items");
        assertEquals(cat.getStyles().size(), view.getItemCount());
    }
View Full Code Here

        tester.startPage(StylePage.class);
        tester.assertRenderedPage(StylePage.class);
       
        Catalog cat = getCatalog();
   
        DataView view =
            (DataView) tester.getComponentFromLastRenderedPage("table:listContainer:items");
   
        int expected = cat.getStyles().size() - cat.getStylesByWorkspace("sf").size();
   
        AdminRequest.start(new Object());
        assertEquals(expected, view.getItemCount());
   
        for (Iterator<Item> it = view.getItems(); it.hasNext();) {
            String name = it.next().get("itemProperties:0:component:link:label")
                .getDefaultModelObjectAsString();
            assertFalse("sf_style".equals(name));
        }
    }
View Full Code Here

        tester.startPage(WorkspacePage.class);
        tester.assertRenderedPage(WorkspacePage.class);
        tester.assertNoErrorMessage();

        //assert only cite workspace visible
        DataView dv = (DataView) tester.getComponentFromLastRenderedPage("table:listContainer:items");
        assertEquals(1, dv.size());

        //the actual web request is finished, so we need to fake another one
        AdminRequest.start(new Object());
        assertEquals(1, dv.getDataProvider().size());
       
        WorkspaceInfo ws = (WorkspaceInfo) dv.getDataProvider().iterator(0, 1).next();
        assertEquals("cite", ws.getName());
    }
View Full Code Here

    public void testLayerAllPage() throws Exception {
        loginAsCite();
        tester.startPage(LayerPage.class);
        tester.assertRenderedPage(LayerPage.class);

        DataView dv =
            (DataView) tester.getComponentFromLastRenderedPage("table:listContainer:items");
        assertEquals(getCatalog().getResourcesByNamespace("cite", ResourceInfo.class).size(), dv.size());
    }
View Full Code Here

        tester.startPage(StorePage.class);
        tester.assertRenderedPage(StorePage.class);
        tester.assertNoErrorMessage();
       
        DataView dv = (DataView) tester.getComponentFromLastRenderedPage("table:listContainer:items");
        assertEquals(getCatalog().getStoresByWorkspace("cite", StoreInfo.class).size(), dv.size());
    }
View Full Code Here

        tester.startPage(LayerGroupPage.class);
        tester.assertRenderedPage(LayerGroupPage.class);

        Catalog cat = getCatalog();

        DataView view =
            (DataView) tester.getComponentFromLastRenderedPage("table:listContainer:items");
        assertEquals(cat.getLayerGroups().size(), view.getItemCount());
    }
View Full Code Here

        tester.startPage(LayerGroupPage.class);
        tester.assertRenderedPage(LayerGroupPage.class);
       
        Catalog cat = getCatalog();

        DataView view =
            (DataView) tester.getComponentFromLastRenderedPage("table:listContainer:items");

        AdminRequest.start(new Object());
        assertEquals(cat.getLayerGroups().size(), view.getItemCount());

        for (Iterator<Item> it = view.getItems(); it.hasNext();) {
            String name = it.next().get("itemProperties:0:component:link:label")
                .getDefaultModelObjectAsString();
            assertFalse("sf_local".equals(name));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.repeater.data.DataView

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.