You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Andreas Lundblad <an...@gmail.com> on 2014/09/29 15:59:15 UTC
List editor
I have written my own FormComponentPanel for my domain object, "MyObject".
Now I'd like to be able to have a form component for editing List<MyObject>.
The best resource I can find on this subject is
http://wicketinaction.com/2008/10/building-a-listeditor-form-component/
by Igor Vaynberg
However, I'm having troubles following the instructions. I suspect that
it's because that tutorial targets an older version of Wicket. For
instance, ListItem already exists in the wicket library (is it the same, or
should I rename the class in the tutorial?) and RepeatingView doesn't have
a getModelObject() method so I get a compile error on that line.
I've also discovered that there are a few interesting new methods/classes,
such as IItemReuseStrategy which may help me write an even more elegant
list editor.
So, my question: Is there a more recent tutorial somewhere? Or is the above
mentioned tutorial still the best way to go apart from some minor changes?
best regards,
Andreas Lundblad
Re: List editor
Posted by Martin Grigorov <mg...@apache.org>.
Hi,
I am not aware of a newer article on this topic.
- ListItem - use the one from the article
- getModelObject() - getDefaultModelObject()
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
On Mon, Sep 29, 2014 at 3:59 PM, Andreas Lundblad <
andreas.lundblad@gmail.com> wrote:
> I have written my own FormComponentPanel for my domain object, "MyObject".
> Now I'd like to be able to have a form component for editing
> List<MyObject>.
>
> The best resource I can find on this subject is
>
> http://wicketinaction.com/2008/10/building-a-listeditor-form-component/
>
> by Igor Vaynberg
>
> However, I'm having troubles following the instructions. I suspect that
> it's because that tutorial targets an older version of Wicket. For
> instance, ListItem already exists in the wicket library (is it the same, or
> should I rename the class in the tutorial?) and RepeatingView doesn't have
> a getModelObject() method so I get a compile error on that line.
>
> I've also discovered that there are a few interesting new methods/classes,
> such as IItemReuseStrategy which may help me write an even more elegant
> list editor.
>
> So, my question: Is there a more recent tutorial somewhere? Or is the above
> mentioned tutorial still the best way to go apart from some minor changes?
>
>
> best regards,
> Andreas Lundblad
>