Re: [CForms] Cardinality check for repeater

2005-10-04 Thread Thomas Lutz
Thomas Lutz wrote: Ok, so lets sum up what we've got so far: -its not sure that we get valid data from the binding -so we need validation _and_ enabling/disabling of the action buttons -enabling and disabling could be done in the ActionRepeater* classes So the last problem is the right place

Re: [CForms] Cardinality check for repeater

2005-10-04 Thread Jeroen Reijn
Thomas, i've not tried it yet, but thanks for the effort! Jeroen Thomas Lutz wrote: Thomas Lutz wrote: Ok, so lets sum up what we've got so far: -its not sure that we get valid data from the binding -so we need validation _and_ enabling/disabling of the action buttons -enabling and

Re: [CForms] Cardinality check for repeater

2005-09-28 Thread Sylvain Wallez
Thomas Lutz wrote: Hi list ! A recent discussion on the users list [1] showed that there is interest in implementing a minimum/maximum number of rows check in CForm's repeaters. Jorg Heymans submitted a patch to bugzilla [2], that adds the minimum-size and maximum-size attributes to the

Re: [CForms] Cardinality check for repeater

2005-09-28 Thread Thomas Lutz
Sylvain Wallez wrote: snip / Hmm... There are different issues here: Validation: We can extend the fd:range or fd:value-count validators so that they can validate a repeater. But the issue then is that a repeater has no way to automatically display its error, and therefore it's up the

Re: [CForms] Cardinality check for repeater

2005-09-28 Thread Jeroen Reijn
Thomas Lutz wrote: snip / - add support for repeater listeners, so that repeater-actions and row-actions can register themselves on the repeater and automatically change their state according to the size of the repeater. Looking at the sources I found that there is a ActionListener class

Re: [CForms] Cardinality check for repeater

2005-09-28 Thread Jorg Heymans
Jeroen Reijn wrote: I'm not sure why there should be a validation message when the amount of rows exceeds the maximum. If you reach the max attribute , you should not be able to add another row right? Then there is no need for a validation error. Or am I missing something? And what if

Re: [CForms] Cardinality check for repeater

2005-09-28 Thread Thomas Lutz
Ok, so lets sum up what we've got so far: -its not sure that we get valid data from the binding -so we need validation _and_ enabling/disabling of the action buttons -enabling and disabling could be done in the ActionRepeater* classes So the last problem is the right place for the validation