inspecting property models

2007-05-10 Thread Ryan Sonnek
This discussion came out of the recent hibernate wicket-stuff activity. For my behaviors/validators/listeners to work, I need to have visibility into the PropertyModel's internal configuration. In particular, I need access to the: * propertyExpression configured for a particular form component *

Re: Hibernate Validator integration?

2007-05-10 Thread Eelco Hillenius
Also, it's solvable, and we should focus on the concept first. Eelco On 5/10/07, Bruno Borges <[EMAIL PROTECTED]> wrote: There's no removeValidator(), right? So, we dont have to care about behaviors added by validators. -- Bruno Borges Summa Technologies Inc. www.summa-tech.com (48) 8404-1300

Re: Hibernate Validator integration?

2007-05-10 Thread Igor Vaynberg
On 5/10/07, Johan Compagner <[EMAIL PROTECTED]> wrote: > > can you remove behaviors that validator has added? when your remove a > validator how will you know which behaviors were linked? see my previous mail (i aksed the same thing to eelco) just don't add the behavior to the behaviors just i

Re: Hibernate Validator integration?

2007-05-10 Thread Johan Compagner
can you remove behaviors that validator has added? when your remove a validator how will you know which behaviors were linked? see my previous mail (i aksed the same thing to eelco) just don't add the behavior to the behaviors just in render also walk over the validators and get the behavior i

Re: Hibernate Validator integration?

2007-05-10 Thread Igor Vaynberg
im sure there will be one in a near future. -igor On 5/10/07, Bruno Borges <[EMAIL PROTECTED]> wrote: There's no removeValidator(), right? So, we dont have to care about behaviors added by validators. -- Bruno Borges Summa Technologies Inc. www.summa-tech.com (48) 8404-1300 (11) 3055-2060 O

Re: Hibernate Validator integration?

2007-05-10 Thread Bruno Borges
There's no removeValidator(), right? So, we dont have to care about behaviors added by validators. -- Bruno Borges Summa Technologies Inc. www.summa-tech.com (48) 8404-1300 (11) 3055-2060 On 5/10/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: On 5/10/07, Johan Compagner <[EMAIL PROTECTED]> wrote

Re: Hibernate Validator integration?

2007-05-10 Thread Igor Vaynberg
On 5/10/07, Johan Compagner <[EMAIL PROTECTED]> wrote: i find that class extremely ugly IValidator is a pretty simple interface but IBehavior not. And what does that solve? nothing i don't find it any cleaner can you remove behaviors that validator has added? when your remove a validator how

Re: Hibernate Validator integration?

2007-05-10 Thread Bruno Borges
[x] All above -- Bruno Borges Summa Technologies Inc. www.summa-tech.com (48) 8404-1300 (11) 3055-2060 On 5/10/07, Johan Compagner <[EMAIL PROTECTED]> wrote: If we are talking about client side validators: then you want support for 2 behaviors that are attached to "blur" and "onchange" ? or on

Re: Hibernate Validator integration?

2007-05-10 Thread Johan Compagner
If we are talking about client side validators: then you want support for 2 behaviors that are attached to "blur" and "onchange" ? or one client side javascript check and an ajax call to the behavior? Or are there others that you have in mind? johan On 5/10/07, Bruno Borges <[EMAIL PROTECTED]>

Re: Hibernate Validator integration?

2007-05-10 Thread Johan Compagner
i find that class extremely ugly IValidator is a pretty simple interface but IBehavior not. And what does that solve? nothing i don't find it any cleaner And you have to add it twice.. or only as a valdiator and we add it also as a validator?? (then you have to do that funny cast) And as a said

Re: Hibernate Validator integration?

2007-05-10 Thread Johan Compagner
> > we just don't have multiply inheritance in java.. Thank God we don't have multiple inheritance... Since these interfaces are so thin, creating a class that implements both interfaces and delgates to separate implementation classes should be pretty light weight. and if you want that with t

Re: Hibernate Validator integration?

2007-05-10 Thread Bruno Borges
What if we want to have in one IValidator, more than one IBehavior? just wondering... :) This could be important and usefull, if in one Validator two _very simple_ behaviors are needed, and they need to be keep separated with each other. []'s -- Bruno Borges Summa Technologies Inc. www.summa-tec

Re: Hibernate Validator integration?

2007-05-10 Thread Igor Vaynberg
On 5/10/07, Johan Compagner <[EMAIL PROTECTED]> wrote: and i don't like that that is mixing 2 classes as once thing that means no reuse what so ever. This just makes big copy paste actions. lets see a concrete example of this. i dont see how my ValidatorWithBehavior thing prevents any reuse.

Re: Hibernate Validator integration?

2007-05-10 Thread Ryan Sonnek
On 5/10/07, Johan Compagner <[EMAIL PROTECTED]> wrote: and i don't like that that is mixing 2 classes as once thing that means no reuse what so ever. This just makes big copy paste actions. it should be possible to seperate IValidator and IBehavior implementations else if i want to use an IValid

Re: Hibernate Validator integration?

2007-05-10 Thread Johan Compagner
and i don't like that that is mixing 2 classes as once thing that means no reuse what so ever. This just makes big copy paste actions. it should be possible to seperate IValidator and IBehavior implementations else if i want to use an IValidator i have to reimplement it yes ofcourse i can make my

Re: FormTester.setValue not working

2007-05-10 Thread behlma
Hi Bruno, FormTester actually does work. I've been playing around with it the last couple of days. Have you got any validators set on your form fields? Like LengthValidator? Furthermore what error messages do you get? Bruno Borges wrote: > >> >> FormTester form = tester.newFormTester("form"); >

Re: Hibernate Validator integration?

2007-05-10 Thread Bruno Borges
Updated to revision 2123 []'s -- Bruno Borges Summa Technologies Inc. www.summa-tech.c

Re: Hibernate Validator integration?

2007-05-10 Thread Bruno Borges
Have any of you seen this codeI commited? There are some comments in it to discuss abo

wicket-contrib-push: question about "proxy" = "true"

2007-05-10 Thread Xavier Hanin
Hey there, I have a question about the data "proxy" set to "true" in CometdEvent: what is it used for? Indeed I would like to get rid of CometdEvent, to make implementation switch very easy, but I'm not sure if all cometd events should always have this property set, or if only some should. If th

Re: Hibernate Validator integration?

2007-05-10 Thread Bruno Borges
Cool. This can do the job. :) Dummy question: why newValidationBehavior and not just newBehavior ? :D []' s! -- Bruno Borges Summa Technologies Inc. www.summa-tech.com (48) 8404-1300 (11) 3055-2060 On 5/10/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: That's what we have/ had. You let IValid

FormTester.setValue not working

2007-05-10 Thread Bruno Borges
FormTester form = tester.newFormTester("form"); form.setValue("id", "555"); form.setValue("name", "foo"); form.submit(); tester.assertNoErrorMessage(); This code is not working as error messages comes up anyway. Is this the right way to test a Form? If nobody has ever tried this, I'll create

Re: Hibernate Validator integration?

2007-05-10 Thread Eelco Hillenius
That's what we have/ had. You let IValidator extend IBehaviorProvider and then implement newValidatorBehavior. Eelco On 5/10/07, Bruno Borges <[EMAIL PROTECTED]> wrote: Why don't let IValidator has its own behavior if it wants to. IValidator.getBehavior() Behavior goes on the client-side, rig

Re: Hibernate Validator integration?

2007-05-10 Thread Bruno Borges
Why don't let IValidator has its own behavior if it wants to. IValidator.getBehavior() Behavior goes on the client-side, right? (I'm still a little confused about all these interfaces...) Isn't this ok ? If not, why? -- Bruno Borges Summa Technologies Inc. www.summa-tech.com (48) 8404-1300 (11

Re: Hibernate Validator integration?

2007-05-10 Thread Igor Vaynberg
On 5/10/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: This is (of course) the first solution I worked on, and in fact the solution I preferred up to yesterday (and maybe still prefer, not sure). It needed some API changes though, as currently you can't have a class that implements both interfac

Re: Hibernate Validator integration?

2007-05-10 Thread Eelco Hillenius
im talking about having access to component inside validate(ivaldiatable). it would take some ugly hacking to be able to do this with ibehaviorprovider, unless you do the same thing...let ibehaviorprovider.newbehavior return this. Yeah, gotcha. Well, that's one of the things that I did like abou

Re: Hibernate Validator integration?

2007-05-10 Thread Igor Vaynberg
im talking about having access to component inside validate(ivaldiatable). it would take some ugly hacking to be able to do this with ibehaviorprovider, unless you do the same thing...let ibehaviorprovider.newbehavior return this. -igor On 5/10/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: O

Re: Hibernate Validator integration?

2007-05-10 Thread Eelco Hillenius
On 5/10/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: actually another advantage of doing this, as far as hibernate validator stuff goes, is that because it is a behavior and validator in one the validator can get access to the component it is attached to via behavior.bind(). Not really a distin

Re: Hibernate Validator integration?

2007-05-10 Thread Eelco Hillenius
hrm. after looking at it i dont like it :| ivalidator is a pretty simple interface. why not simply allow a behavior to implement it add(ivalidator v) { if (v instanceof ibehavior) { add((ibehavior)v); } ... } so now a behavior can implement ivalidator. the problem that ibehaviorprovider tri

Re: Hibernate Validator integration?

2007-05-10 Thread Xavier Hanin
On 5/10/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: Yeah, for sure. Everyone is more than welcome to help with this (and I'll only be looking from the side line to see whether we can do more in the core project to support this very interesting case further), especially when you want to use it

Re: Hibernate Validator integration?

2007-05-10 Thread Igor Vaynberg
actually another advantage of doing this, as far as hibernate validator stuff goes, is that because it is a behavior and validator in one the validator can get access to the component it is attached to via behavior.bind(). -igor On 5/10/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: hrm. after

Re: Hibernate Validator integration?

2007-05-10 Thread Eelco Hillenius
Yeah, for sure. Everyone is more than welcome to help with this (and I'll only be looking from the side line to see whether we can do more in the core project to support this very interesting case further), especially when you want to use it for real. So officially Ryan and Bruno are working on t

Re: Hibernate Validator integration?

2007-05-10 Thread Igor Vaynberg
hrm. after looking at it i dont like it :| ivalidator is a pretty simple interface. why not simply allow a behavior to implement it add(ivalidator v) { if (v instanceof ibehavior) { add((ibehavior)v); } ... } so now a behavior can implement ivalidator. the problem that ibehaviorprovider tries

Re: Hibernate Validator integration?

2007-05-10 Thread Eelco Hillenius
Ah, yeah. *That's* why it didn't override IClusterable; I was already wondering that. Sorry for breaking; I'll keep it in mind from now on (maybe an extra comment wouldn't hurt). Eelco On 5/10/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: i changed ivalidator extends iclusterable to extends ser

Re: Hibernate Validator integration?

2007-05-10 Thread Xavier Hanin
On 5/10/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: > > Similarly, the Length element can and probably should be using a > > StringValidator for a TextField and not setting maxlength. Maybe it > > should do both. ;-) > I've thought about using validators here and "ideally" would use a > Strin

Re: Hibernate Validator integration?

2007-05-10 Thread Eelco Hillenius
> Similarly, the Length element can and probably should be using a > StringValidator for a TextField and not setting maxlength. Maybe it > should do both. ;-) I've thought about using validators here and "ideally" would use a StringValidatorWithBehavior that would automatically attach the markup a

Re: Hibernate Validator integration?

2007-05-10 Thread Igor Vaynberg
i changed ivalidator extends iclusterable to extends serializable, that way we do not break decoupling. if it needs an extra line in terracotta config then so be it. -igor On 5/10/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote: I just committed the first pass without what you proposed yet. May

Re: Hibernate Validator integration?

2007-05-10 Thread Ryan Sonnek
On 5/10/07, Al Maw <[EMAIL PROTECTED]> wrote: Ryan Sonnek wrote: > I'd appreciate anyone interested to take a look and let me know what > they think. You currently setRequired(true) on a NotEmpty, which isn't what that intends at all. It's purpose is to make sure a String is length > 0, or a co

Re: Hibernate Validator integration?

2007-05-10 Thread Al Maw
Ryan Sonnek wrote: I'd appreciate anyone interested to take a look and let me know what they think. You currently setRequired(true) on a NotEmpty, which isn't what that intends at all. It's purpose is to make sure a String is length > 0, or a collection has more than zero elements. Simila

Re: Hibernate Validator integration?

2007-05-10 Thread Eelco Hillenius
Yeah, like I said we can consider that. I'm not sure at this point though. What I like about this first pass is that it is simple and it plays through all the rules normal behaviors go through (including acceptance etc). If we ever allow removing validators, that could be supported by keeping a se

Re: Hibernate Validator integration?

2007-05-10 Thread Johan Compagner
didn't you want to look for validator behaviors at render time? That has his plusses.. Also when we make a method removeValidator (inline with removeBehavior) but don't know if that is really needed then that method is easier because else we also have to search for the behavior of the validator.

Re: Hibernate Validator integration?

2007-05-10 Thread Eelco Hillenius
I just committed the first pass without what you proposed yet. Maybe you can take a look at that Igor? I kept the mechanism as simple as I could. At a later stage, we can see whether we need to optimize (e.g. by not keeping references to the behaviors) though the simplicity of this solution has s

Re: Wicket Stuff commit access

2007-05-10 Thread Nino Saturnino Martinez Vazquez Wael
No Actually dont need the 1.5 version.. But thats also up to Iulian.. Eelco Hillenius wrote: I need to maintain a 1.4 version aswell as the 1.5 version, as our customer sadly are running 1.4. How are this best done, should I create another branch or? If I look in the "plain" wicket trunk I can

Re: Wicket Stuff commit access

2007-05-10 Thread Eelco Hillenius
I need to maintain a 1.4 version aswell as the 1.5 version, as our customer sadly are running 1.4. How are this best done, should I create another branch or? If I look in the "plain" wicket trunk I can see that you first tell what jdk it is, should wicket stuff be the same?' Nah, I don't think

Re: Wicket Stuff commit access

2007-05-10 Thread Nino Saturnino Martinez Vazquez Wael
Hi Eelco I need to maintain a 1.4 version aswell as the 1.5 version, as our customer sadly are running 1.4. How are this best done, should I create another branch or? If I look in the "plain" wicket trunk I can see that you first tell what jdk it is, should wicket stuff be the same?' rega

Re: Wicket Stuff commit access

2007-05-10 Thread Nino Saturnino Martinez Vazquez Wael
weee:) Eelco Hillenius wrote: You're in. Eelco On 5/10/07, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]> wrote: Hi Igor didnt know that I needed to supply it, I am new to this... my Id are : *nmwael *regards Nino* * Igor Vaynberg wrote: > where is your sf.net id? > > -igor > > O

Re: Wicket Stuff commit access

2007-05-10 Thread Eelco Hillenius
You're in. Eelco On 5/10/07, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]> wrote: Hi Igor didnt know that I needed to supply it, I am new to this... my Id are : *nmwael *regards Nino* * Igor Vaynberg wrote: > where is your sf.net id? > > -igor > > On 5/9/07, Nino Saturnino Martine

Re: Wicket Stuff commit access

2007-05-10 Thread Nino Saturnino Martinez Vazquez Wael
Hi Igor didnt know that I needed to supply it, I am new to this... my Id are : *nmwael *regards Nino* * Igor Vaynberg wrote: where is your sf.net id? -igor On 5/9/07, Nino Saturnino Martinez Vazquez Wael <[EMAIL PROTECTED]> wrote: want to be able to commit to the gmap contrib...

Re: svn commit: r536736 - /incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MergedMarkup.java

2007-05-10 Thread Juergen Donnerstag
sorry, I forgot to uncomment it. Interesting that no junit test failed -> we definitely should add one to avoid such fauxpage in the future. The change is part of a (small) step by step change towards markup fragments. Juergen On 5/10/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote: juergen, did y