Example usage for org.apache.wicket.markup.html.list Loop.LoopItem add

List of usage examples for org.apache.wicket.markup.html.list Loop.LoopItem add

Introduction

In this page you can find the example usage for org.apache.wicket.markup.html.list Loop.LoopItem add.

Prototype

public MarkupContainer add(final Component... children) 

Source Link

Document

Adds the child component(s) to this container.

Usage

From source file:estudiante.panel.java

public panel(PageParameters params) {

    add(new Link("salir") {
        @Override/*from  w w  w.j ava 2 s. com*/
        public void onClick() {
            //  throw new UnsupportedOperationException("Not supported yet.");
            setResponsePage(publico.index.class);
        }
    });
    cn = new Consultass();
    torneos = cn.getTorneos();

    Loop loop = new Loop("list", torneos.length) {
        protected void populateItem(Loop.LoopItem item) {
            pnombre = new Label("pnombre", Model.of("" + torneos[i][0]));
            pnombre.setEscapeModelStrings(false);

            pinicio = new Label("pini", Model.of("" + torneos[i][1]));
            pinicio.setEscapeModelStrings(false);

            pfin = new Label("pend", Model.of("" + torneos[i][2]));
            pfin.setEscapeModelStrings(false);

            pnivel = new Label("pnivel", Model.of("" + torneos[i][3]));
            pnivel.setEscapeModelStrings(false);

            pcreador = new Label("pcreador", Model.of("" + torneos[i][4]));
            pcreador.setEscapeModelStrings(false);

            item.add(pnombre);
            item.add(pinicio);
            item.add(pfin);
            item.add(pnivel);
            item.add(pcreador);
            i++;
        }

    };
    add(loop);

}