try: *new* CheckGroup("sectorCheckGroup", new Model());

the check group doesn't have a model where it can store the values in.

johan



On 1/5/07, Lost Still Lost <[EMAIL PROTECTED]> wrote:

Hello I'm Yuri.
I was trying to make use of a ListView instance to get checkboxes for
strings that I have stored in a database
But I get this error when trying to access the page containing the
ListView instance.

*WicketMessage: CheckGroup [4:searchform:sectorCheckGroup] contains a null
model object, must be an object of type java.util.Collection*
*Root cause:*
*wicket.WicketRuntimeException: CheckGroup [4:searchform:sectorCheckGroup]
contains a null model object, must be an object of type
java.util.Collection
*
My HTML page which consist of the ListView code is as follows:

<
span wicket:id="sectorCheckGroup">

    <label>select one or more numbers (CheckGroup)

      <span wicket:id="sectors">

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

         <span wicket:id="naam">[this is where number will be]</span>

      </span>

    </label> </span>


My Model class have the following getter method:
*

public
* List getSectorCheckGroup()

{

*   return* sectorCheckGroup; }
sectorCheckGroup is a *List  *type


My Page/Java class have the following code that refers to the ListView:

List se = Arrays.*asList*(*new* String[] {"Primair", "Special", "Superb
special"});


sectors
= *new* CheckGroup("sectorCheckGroup");

add(
sectors);

sectorList = *new* ListView("sectors", se)

{

*  protected* *void* populateItem(ListItem item)

  {

      item.add(
*new* Check("check", item.getModel()));


item.add(*new* Label("name", item.getModelObjectAsString()));

  };

};
sectors.add(sectorList);



My Code is pretty much the same as the one in the wicket-examples(the
Forminput example which uses ListView)
What is it that I'm doing wrong then?
Anyone?




------------------------------
Get free, personalized online radio with MSN Radio powered by Pandora. Try
it! <http://radio.msn.com>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to