> You could try something like:
>
>    class Step2 extends WizardStep {
>        public Step2() {
>            super("Things", "Now Enter As Many 'Things' As You Opted For");
>            add(new Loop("things", new
> ComponentPropertyModel("numberOfThings")) {
>                @Override
>                protected void populateItem(LoopItem item) {
>                    IModel model = thingModel(item.getIteration()); //
> create model or reuse existing
>                    item.add(new TextField("thing", model));
>                }
>            });
>        };
>    }

Yeah, something like that should work. Also, take a look at the
org.apache.wicket.extensions.wizard.dynamic package for when your
wizard steps need to be completely dynamic.

> Hej core devs, I was wondering when I'd use the Loop class - is this a
> decent abuse of it?!

Sure. In general, I'd opt for ListView or another repeater, but if
things are really as simple to have only a few steps, no other model,
this is fine.

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to