Thanks for adding the 'INullAcceptingValidator'. This solves our problem in a
clean way.
Just a small suggestion: I've seen that the CompoundValidator does not
implement this interface. Would it not be correct to assure that the
CompoundValidator is called always, and that the same logic of check
I'll take a look at it. Thanks.
Jan.
--
View this message in context:
http://www.nabble.com/Problem-with-latest-changes-in-FormComponent%3Avalidate%28%29-tf3945885.html#a11411421
Sent from the Wicket - Dev mailing list archive at Nabble.com.
Jan,
Just wanted to follow up with on this. If you're looking for tight
integration of wicket with hibernate annotations, please check out the
wicketstuff-hibernate project. I really think this would work well for
you. You've obviously been working in this area for a while, so if there
are any
Thanks for adding the 'INullAcceptingValidator'. This solves our problem in a
clean way.
Just a small suggestion: I've seen that the CompoundValidator does not
implement this interface. Would it not be correct to assure that the
CompoundValidator is called always, and that the same logic of check
and that all makes perfect sense, however at its current state the
requried/null checks are considered syntactic checks. if not then every
ivalidator out there must first perform the null check, which is annoying.
how about:
class ConstraintValidator extends ... implments IValidatorAddListener {
Let me try to explain:
First, we have a way of gathering 'constraints' for bean properties, that
are based either on validator annotations on the bean, or on a settings
environment (the beanClass & propertyPath are derived from the model of the
formComponent). The endresult is a list of IConstrai
I understand, and yes it makes sense. Validation, and the order in which it
should be invoked, is a complex theme, and we have been struggling with it
for a while too.
We make a distinction between syntactic and semantic (business) validation:
syntactic validation should happen before conversion,
On 6/19/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
Maybe a bit OT, but how exactly do you implement this Jan?
The project I'm working on has:
public final class ValidationListener implements
IComponentOnBeforeRenderListener {
public void onBeforeRender(Component component) {
if (comp
Maybe a bit OT, but how exactly do you implement this Jan?
The project I'm working on has:
public final class ValidationListener implements
IComponentOnBeforeRenderListener {
public void onBeforeRender(Component component) {
if (component instanceof FormComponent && !component.hasBeenRender
what version are you using?
RequiredValidator is gone in 1.3, let me try to explain the reason:
warning, below is a brain dump, so tread softly
it has to do with type-conversion and where it fits in the workflow of
validating the component
we want validators to work on properly converted types.
Problem with all these solutions, is that we have to differentiate between
'RequiredValidators' and other validators, which means somehow we have to
know which ones to call when. Because now, there is just a list of
validators, added to the component, and they get called by Wicket. What I'm
trying
or instead,
maybe make that hibernatevalidator also be a behavior, and simply toggle
component's setrequired in onattach
-igor
On 6/19/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
i dont know about that. isvalid's contract is that it only returns false
if there are error messages reported ag
i dont know about that. isvalid's contract is that it only returns false if
there are error messages reported against the component.
i think this would be simple enough
class hibernatetextfield extends textfield {
valid() {
if (hibernaterequired()) {
if (Strings.isEmpty(getInput()[0]))
igor.vaynberg wrote:
>
> i would not be against making formcomponent.validate() non-final
>
> -igor
>
I was thinking of making 'isValid()' non-final, and adding that logic in
there.
Jan.
--
View this message in context:
http://www.nabble.com/Problem-with-latest-changes-in-FormComponent%3Av
i would not be against making formcomponent.validate() non-final
-igor
On 6/19/07, Jan Vermeulen <[EMAIL PROTECTED]> wrote:
That means you can never put 'required' logic in a validator. And that's
just
what we want to do, because that's the way we can integrate with the
Hibernate validators.
That means you can never put 'required' logic in a validator. And that's just
what we want to do, because that's the way we can integrate with the
Hibernate validators. I saw some time ago on the forum that there was
interest in integrating the Wicket validators with the Hibernate validator
framew
the added code is there to guard validators against having to check for
null. if we remove it then the first thing all validators should do is check
if validatable.getvalue() is null - which gets annoying and causes NPEs if
you forget.
wicket has a facility for setting whether or not the componen
more logical would imo be if the validators could be chained and then
let them deside if they want to do And or Or logic. But i have never
worked with validators before so i am not sure if this already
possible or not.
my 2c
Maurice
On 6/19/07, Jan Vermeulen <[EMAIL PROTECTED]> wrote:
The cod
The code below is the actual code of FormComponent:validate()
public final void validate()
{
validateRequired();
if (isValid())
{
convert();
if (isValid() && g
19 matches
Mail list logo