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
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
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
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
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
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
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