I’m trying to build a Grid of checkboxes.  I would expect my HTML would be something like:

 

           <table>

              <tr wicket:id="rows">

                <td wicket:id="cols">

                  <input type="checkbox" wicket:id="checkbox"/>

                  <span wicket:id="checkboxLabel"></span>

                </td>

              </tr>

            </table>

 

My Grid subclass must implement the methods “void populateItem(Item item)” and “void populateEmptyItem(Item item)”

 

For “void populateItem(Item item)” I would create Checkbox(“checkbox”) and Label(“checkboxLabel”) components and add them to my Item object.

 

The “void populateEmptyItem(Item item)” method is to fill the remainder of the grid when one has run out of items to place in it.  What should this method add to the Item markupContainer?  I can easily create a Label with an empty string, but what sort of NullComponent(“checkbox”) could I add to match the <input type=”checkbox” wicket:id=”checkbox”/> in the empty grid cells?

Reply via email to