On Tue, Feb 19, 2008 at 9:04 PM, Martin Makundi
<[EMAIL PROTECTED]> wrote:
> > in your validate method why dont you iterate over the todo items
>  > instead of components. isnt that what the checkboxes are bound to?
>
>  The idea is to validate the input before it gets updated into the todo
>  items, yes? That is why I iterate the components... ofcourse I could
>  validate it after the state has been updated (it wouldn't matter if I
>  want to keep the invalid input on screen) but that seems more like a
>  workaround than the proper solution.

a proper solution would be to use a validator or a formvalidator to do
this. generally you never iterate over components to do validation in
wicket. we have good plugin points for you in the form workflow.

>  > also you are using a LISTview, are todo items really identified
>  > uniquely by their index returned from todoList =
>  > TodoServices.browseWeek(currentWeekStartDate, user) ?
>
>  The todo items are unique (try running the code ;)..

you didnt show the part of code that generates the list...

> it is just a  dummy list of new todo items.

they are unique but you are using a listview? so what you have is not
a list at all, it is a collection of random items. perhaps listview is
not what you want. if you keep regenerating items every request and
their equality is determined by instance equality then listview thinks
they go out of view on every request.

>  Is there a bug with the checkbox?

doubt it

-igor


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

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

Reply via email to