Package org.apache.wicket.markup.html.list

Examples of org.apache.wicket.markup.html.list.ListView


      rc.setLabel(new Model("number"));
      add(rc);

      RadioGroup group = new RadioGroup("numbersGroup");
      add(group);
      ListView persons = new ListView("numbers", NUMBERS)
      {
        protected void populateItem(ListItem item)
        {
          item.add(new Radio("radio", item.getModel()));
          item.add(new Label("number", item.getModelObjectAsString()));
        };
      };
      group.add(persons);

      CheckGroup checks = new CheckGroup("numbersCheckGroup");
      add(checks);
      ListView checksList = new ListView("numbers", NUMBERS)
      {
        protected void populateItem(ListItem item)
        {
          item.add(new Check("check", item.getModel()));
          item.add(new Label("number", item.getModelObjectAsString()));
View Full Code Here


  public static final int IMAGES_PER_PAGE = 20;

  public ResourceTestPage()
  {
    List list = Arrays.asList(new Object[IMAGES_PER_PAGE]);
    add(new ListView("listView", list)
    {

      @Override
      protected void populateItem(ListItem item)
      {
View Full Code Here

   * Construct.
   */
  public Index()
  {
    add(new Label("currentUser", new PropertyModel(this, "session.user")));
    add(new ListView("users", RolesApplication.USERS)
    {
      @Override
      protected void populateItem(ListItem item)
      {
        final User user = (User)item.getModelObject();
View Full Code Here

     *            the component identifier
     */
    public FilesBrowser(String id)
    {
      super(id);
      ListView lv = new ListView("file", new PackagedResourcesModel())
      {
        protected void populateItem(ListItem item)
        {
          AjaxFallbackLink link = new AjaxFallbackLink("link", item.getModel())
          {
View Full Code Here

        return getGame().getWord().asString(true);
      }
    }));

    // Show the game's letters
    add(new ListView("letters", getGame().getLetters())
    {
      protected void populateItem(final ListItem listItem)
      {
        final Letter letter = (Letter)listItem.getModelObject();
        final Link link = new Link("letter")
View Full Code Here

      rc.setRequired(true);
      add(rc);

      RadioGroup group = new RadioGroup("numbersGroup");
      add(group);
      ListView persons = new ListView("numbers", NUMBERS)
      {
        protected void populateItem(ListItem item)
        {
          item.add(new Radio("radio", item.getModel()));
          item.add(new Label("number", item.getModelObjectAsString()));
        };
      }.setReuseItems(true);
      group.add(persons);

      CheckGroup checks = new CheckGroup("numbersCheckGroup");
      add(checks);
      ListView checksList = new ListView("numbers", NUMBERS)
      {
        protected void populateItem(ListItem item)
        {
          item.add(new Check("check", item.getModel()));
          item.add(new Label("number", item.getModelObjectAsString()));
View Full Code Here

     */
    public Test(String id)
    {
      super(id);
      List l = Arrays.asList("1", "2", "3", "4", "5");
      ListView listView = new ListView("list", l)
      {
        @Override
        protected void populateItem(ListItem item)
        {
          String i = item.getModelObjectAsString();
          item.add(new UserLabel("userLabel", i));
          item.add(new AdminLabel("adminLabel", i));
        }
      };
      add(listView);
      listView.setReuseItems(true);
    }
View Full Code Here

    // the WebMarkupContainer is used to update the listview in an ajax call
    comments = new WebMarkupContainer("comments");
    add(comments.setOutputMarkupId(true));

    // Add commentListView of existing comments
    comments.add(commentListView = new ListView("comments", new PropertyModel(this,
        "commentList"))
    {
      public void populateItem(final ListItem listItem)
      {
        final Comment comment = (Comment)listItem.getModelObject();
View Full Code Here

    add(form);
   
  }
 
  private void addAllBooksTable() {
    add(new ListView("books", new BookListModel()) {
      public void populateItem(final ListItem listItem) {
        final Book book = (Book) listItem.getModelObject();
        listItem.add(new Label("listedTitle", book.getTitle()));
       
        listItem.add(new MultiLineLabel("listedAuthor", //
View Full Code Here

   * @param expectedList
   *            expected list in the model of {@link ListView}
   */
  public void assertListView(String path, List expectedList)
  {
    ListView listView = (ListView)getComponentFromLastRenderedPage(path);
    WicketTesterHelper.assertEquals(expectedList, listView.getList());
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.list.ListView

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.