Very nice, bringing my
mind back to the mail I wrote earlier(radio buttons with a twist) I guess I
then could do the following, code might not be 100% accurate: List maalinger = Arrays.asList(new
String[][] { {"Aktuelle forløb fordelt på
varighed","description"}, {"antal
forløb","description"}, {"Forløb pr.
berørt","description"}}); myList = new
wicket.markup.html.list.ListView("maaling2",maalinger) { public
void populateItem(wicket.markup.html.list.ListItem item) { String[]
myItem=(String[]) item.getModelObject(); String
radio= myItem[0]; String
info= myItem[1]; item.add(new
Radio("radio”, radio)); item.add(new
Label("info",info)); } }; form.add(myList); Markup: <table wicket:id="maaling2"
> <tr> <td wicket:id="radio"> </td><td wicket:id="info"> </td> </tr> </table> From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Martijn Dashorst populateItem gives you
the ListItem that is being created. On 2/23/06, Thanks, looking at the example again I see that. However I have some difficulty seeing how I would
be able to grab the contents of my List "forklaringer" from within
the populateItem. Could you give an example? -Nino From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
On Behalf Of Nick Heudecker ListView is abstract. You must implement the
populateItem(...) method: On
2/23/06, Hi Im having trouble instantiateing the Listview control, I get the error "Cannot Instiantiate
the type ListView" . This is within these lines the errors occur: private wicket.markup.html.list.ListView myList; … List forklaring = Arrays.asList(new String[] {
"Aktuelle forløb fordelt på varighed", "antal forløb",
"Forløb pr. berørt", "æ", "ø", "å" });
myList
= new wicket.markup.html.list. ListView("list",forklaring); … This part is taken from the javadoc documentation: add(new ListView("rows", listData) which I belive is pretty similar to the code which I've written . - Nino
|
- RE: [Wicket-user] Listview: cannot instantiate the type Nino Wael
- Re: [Wicket-user] Listview: cannot instantiate the t... Martijn Dashorst
- Re: [Wicket-user] Listview: cannot instantiate t... Martijn Dashorst
- RE: [Wicket-user] Listview: cannot instantiate the t... Nino Wael
- Re: [Wicket-user] Listview: cannot instantiate the t... Martijn Dashorst
- Re: [Wicket-user] Listview: cannot instantiate t... Martijn Dashorst
- Re: [Wicket-user] Listview: cannot instantia... deshmol-lists
- Re: [Wicket-user] Listview: cannot insta... Martijn Dashorst