Johan,
Thanks a lot for the help. Here is the result:
http://blogs.sun.com/roller/page/geertjan?entry=czech_beeer_roks
Gj
you look at it wrong
See it just as 2 independen lists..
the outer listview must have the rows you want to have
And the second listview must have the words you want in columns (youre
suggestions)
this: "for (int k = 0; k < allsuggestions.size(); k++) {"
shouldn't be in the code anywhere. That is something the listview
should do for you.
johan
On 4/5/06, *Geertjan Wielenga * <[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>> wrote:
Thanks. This helps. Must I do anything special to move to the next
value
in the list? Currently, I'm rendering the correct number of
values, but
in each case only the first value. So, if my list consists of "a",
"b",
"c", what is being rendered is "a", "a", "a" (which is the correct
number -- 3 -- but in each case only the first value). Here's the
relevant snippet:
List allsuggestions = ((Words)allwrongwords.get(i)).getSuggestions();
for (int k = 0; k < allsuggestions.size(); k++) {
final String onesuggestion = (String)allsuggestions.get(k);
listItem.add(new ListView("innerTable2", allsuggestions) {
protected void populateItem(ListItem listItem) {
MultiLineLabel listItemLabel = new
MultiLineLabel("one_suggestion", onesuggestion);
listItem.add(listItemLabel);
}
});
}
-- Geertjan
Johan Compagner wrote:
> you have to use another listview inside a listitem
> Because that is what you seem to do.
>
> so something like
> <tr wicket:id="outertable">
> <td wicket:id="innertable"><span
wicket:id="one_suggestion"></span></td>
> </tr>
>
> and then the current listItem must add another ListView instance
> (called innertable)
>
> johan
>
>
> On 4/5/06, *Geertjan Wielenga* < [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
> <mailto:[EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>>> wrote:
>
>
> Hi all,
>
> Part of my code goes like this:
>
> for (int k = 0; k <
allsuggestions.size();
> k++) {
> String onesuggestion =
> (String)allsuggestions.get(k);
> listItem.add(new
> MultiLineLabel("one_suggestion", onesuggestion));
> }
>
> So, how do I render a new listitem for each iteration of
this for
> loop?
>
> Currently only the first item in the iteration is rendered.
>
> Geertjan
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking
scripting
> language
> that extends applications into web and mobile media. Attend the
> live webcast
> and join the prime developer group breaking into this new coding
> territory!
>
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
<http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642>
> <
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
<http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642>>
> _______________________________________________
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
<mailto:Wicket-user@lists.sourceforge.net>
> <mailto:Wicket-user@lists.sourceforge.net
<mailto:Wicket-user@lists.sourceforge.net>>
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>
>
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the
live webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
<http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642>
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
<mailto:Wicket-user@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user