Hello ppl,

I have a VO named *Campo* with some attr's.

And my CheckGroup inside of a ListView:

CheckGroup<Campo> checkGroupCampo = new CheckGroup<Campo>("checkGroupCampo",
dadosCarta.getListaCampos());
                checkGroupCampo.add(new 
CheckGroupSelector("groupSelectorCampos"));

                CamposListView listaCampos = new CamposListView("listaCampos", 
new
CamposModel(facade));
                checkGroupCampo.add(listaCampos);
                add(checkGroupCampo);

The CamposModel just return my FULL list to the dtmodel of the ListView.

In my ListView, I have:
        protected void populateItem(final ListItem<Campo> item) {
                Campo campo = item.getModelObject();
                item.add(new Check<Campo>("checkCampo", item.getModel()));
                item.add(new Label("descCampo", campo.getDescCampo()));
}

In the CheckGroup constructor I'm passing *dadosCarta.getListaCampos()*,
that is the List of *Campo*. In one stage this list is empty (when I'm in a
"include process"), but the list can be already filled too (when I'm in a
"modify process"). In that second case, I want the checkboxes inside the
ListView to come already marked. Initially I thought that just passing the
List<Campo> filled to the Checkgroup, as seen in my code, would make the
CheckBoxes marked, but that's not the case.

How can I do this in a elegant way? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/CheckGroup-Model-tp3731606p3731606.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to