001/*
002 * Licensed to the Apache Software Foundation (ASF) under one or more
003 * contributor license agreements.  See the NOTICE file distributed with
004 * this work for additional information regarding copyright ownership.
005 * The ASF licenses this file to You under the Apache License, Version 2.0
006 * (the "License"); you may not use this file except in compliance with
007 * the License.  You may obtain a copy of the License at
008 *
009 *      http://www.apache.org/licenses/LICENSE-2.0
010 *
011 * Unless required by applicable law or agreed to in writing, software
012 * distributed under the License is distributed on an "AS IS" BASIS,
013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014 * See the License for the specific language governing permissions and
015 * limitations under the License.
016 */
017package org.apache.wicket.markup.html.list;
018
019import org.apache.wicket.IGenericComponent;
020import org.apache.wicket.model.IModel;
021
022/**
023 * Container that holds components in a ListView.
024 * 
025 * @see ListView
026 * @author Jonathan Locke
027 * 
028 * @param <T>
029 *            Model object type
030 */
031public class ListItem<T> extends LoopItem implements IGenericComponent<T, ListItem<T>>
032{
033        private static final long serialVersionUID = 1L;
034
035        /**
036         * @param id
037         *            component id
038         * @param index
039         *            relative index of this item in the pageable view
040         * @param model
041         *            model for this item
042         */
043        public ListItem(final String id, int index, final IModel<T> model)
044        {
045                super(id, index, model);
046        }
047
048        /**
049         * A constructor which uses the index and the list provided to create a ListItem. This
050         * constructor is the default one.
051         * 
052         * @param index
053         *            The index of the item
054         * @param model
055         *            The model object of the item
056         */
057        public ListItem(final int index, final IModel<T> model)
058        {
059                super(index, model);
060        }
061
062        /**
063         * Constructor
064         * 
065         * @param id
066         *            component id
067         * @param index
068         *            relative index of this item in the pageable view
069         */
070        public ListItem(final String id, final int index)
071        {
072                super(id, index);
073        }
074}