Java Code Examples for org.apache.wicket.markup.html.list.ListView.setVisible()

The following are Jave code examples for showing how to use setVisible() of the org.apache.wicket.markup.html.list.ListView class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: ontopia   File: FunctionBoxesPanel.java   Source Code and License Vote up 6 votes
public FunctionBoxesPanel(String id) {
  super(id);
  
  Form<Object> form = new Form<Object>("functionBoxesForm");
  add(form);
  
  List<Component> list = getFunctionBoxesList("functionBox"); 
  ListView<Component> functionBoxes = new ListView<Component>("functionBoxesList", list) {
    @Override
    protected void populateItem(ListItem<Component> item) {
      item.add(item.getModelObject());
    }
  };
  functionBoxes.setVisible(!list.isEmpty());
  form.add(functionBoxes);
}