On 10/20/06, Jean-Baptiste Quenot <[EMAIL PROTECTED]> wrote:

* Igor Vaynberg:

> 1) validate the component by calling formcomponent.validate()

The user  is not  expected to  have valid  values when  wishing to
remove a row in a ListView.


these are checkboxes...how do you have an invalid list of checkboxes? i
didnt say validate the entire form - just the checkgroup

2) validate  it to the  point where you can  get the value  - by
> calling convert()

You said  it's not  good to call  convert() because  validation is
skipped.


no, what i said was:

converted input should only be available after successful convert()
validation step - which you are specifically disabling.

so either let the framework do it, or do it yourself, but convert() has to
be called before you call getConvertedInput()


--------------------------------8<--------------------------------

Can you comment on my proposal  to add a new method in CheckGroup,
let's say  getValues() (with an  *s*) that  will return a  list of
booleans, checked or unchecked (true or false)?

Is it a good workaround?


no it is not a good work around - there is no list of booleans you can
return. what would the list of booleans represent? there is no order to the
checkboxes that checkgroup keeps, there is no idea of a "boolean" either.
the checkgroup is designed to populate a model that is a collection with the
model values of checks, there is no good way to go around that. also notice
i said collection not list.

maybe what you want to use is a bunch of CheckBox components instead - those
work with booleans.

-Igor

--
     Jean-Baptiste Quenot
aka  John Banana Qwerty
http://caraldi.com/jbq/

Reply via email to