• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

knowledgepixels / nanodash / 18155160356

01 Oct 2025 07:42AM UTC coverage: 13.788% (-0.03%) from 13.817%
18155160356

push

github

ashleycaselli
docs: add missing or update Javadoc annotations

445 of 4084 branches covered (10.9%)

Branch coverage included in aggregate %.

1155 of 7520 relevant lines covered (15.36%)

0.69 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
src/main/java/com/knowledgepixels/nanodash/component/ItemList.java
1
package com.knowledgepixels.nanodash.component;
2

3
import com.knowledgepixels.nanodash.component.ItemListPanel.ComponentProvider;
4
import org.apache.wicket.ajax.markup.html.navigation.paging.AjaxPagingNavigator;
5
import org.apache.wicket.extensions.markup.html.repeater.data.table.NavigatorLabel;
6
import org.apache.wicket.markup.html.WebMarkupContainer;
7
import org.apache.wicket.markup.html.panel.Panel;
8
import org.apache.wicket.markup.repeater.Item;
9
import org.apache.wicket.markup.repeater.data.DataView;
10
import org.apache.wicket.markup.repeater.data.ListDataProvider;
11

12
import java.io.Serializable;
13
import java.util.List;
14

15
/**
16
 * A reusable Wicket panel that displays a paginated list of items.
17
 *
18
 * @param <T> the type of items in the list, must be Serializable
19
 */
20
public class ItemList<T extends Serializable> extends Panel {
21

22
    /**
23
     * Creates an ItemList panel.
24
     *
25
     * @param markupId     the markup ID for the panel
26
     * @param items        the list of items to display
27
     * @param compProvider a provider that generates a component for each item
28
     */
29
    public ItemList(String markupId, List<T> items, ComponentProvider<T> compProvider) {
30
        super(markupId);
×
31
        setOutputMarkupId(true);
×
32

33
        DataView<T> dataView = new DataView<T>("itemlist", new ListDataProvider<T>(items)) {
×
34

35
            @Override
36
            protected void populateItem(Item<T> item) {
37
                item.add(compProvider.apply(item.getModelObject()));
×
38
            }
×
39

40
        };
41
        dataView.setItemsPerPage(10);
×
42
        dataView.setOutputMarkupId(true);
×
43
        add(dataView);
×
44

45
        WebMarkupContainer navigation = new WebMarkupContainer("navigation");
×
46
        navigation.add(new NavigatorLabel("navigatorLabel", dataView));
×
47
        AjaxPagingNavigator pagingNavigator = new AjaxPagingNavigator("navigator", dataView);
×
48
        navigation.setVisible(dataView.getPageCount() > 1);
×
49
        navigation.add(pagingNavigator);
×
50
        add(navigation);
×
51
    }
×
52

53
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc