Override convertInput is a good option. Keep in mind that at this point of
the form processing (converting input), component models will not be updated
yet. So you need to rely on children converted data
(see FormComponet#getConvertedInput) in order to assemble the
FormComponentPanel converted input.
In order to access your children components, you can use the visitor API,
e.g. MarkupContainer#visitChildren

On Thu, Apr 21, 2011 at 6:17 PM, kamiseq <kami...@gmail.com> wrote:

> hi,
> Im trying to implement a simple form component that accepts List of Strings
>
> *public class AccountsPanel extends FormComponentPanel<List<String>>
> {
> **    **public AccountsPanel(String id, ArrayList<String> accounts) {
> **    **    **super(id, new Model(accounts));
>        buildComponents();
>    }
> }
>
> *and I am using RepeatingView to create as many TextField as many Strings
> are in the List, and this is fine but how then convert each edited value of
> the TextField back to List of Strings???
>
> using convertInput would be a good choice I guess but I have no idea how to
> iterate over panel's components and read value
> *
> @Override
> protected void convertInput()
> {
>    List<String> accounts = getModelObject();*
>    ????
>    *setConvertedInput(accounts);
> }*
>
> or maybe this is happening automagically :D ????
>
> pozdrawiam
> Paweł Kamiński
>
> kami...@gmail.com
> pkaminski....@gmail.com
> ______________________
>



-- 
Pedro Henrique Oliveira dos Santos

Reply via email to