RE: [Wicket-user] New RequiredValidator and DropDownChoice

2006-03-03 Thread Bennett, Timothy (JIS - Applications)
y, February 19, 2006 12:33 AM > To: wicket-user@lists.sourceforge.net > Subject: Re: [Wicket-user] New RequiredValidator and DropDownChoice > > Ok, I think this is the right fix (it's in HEAD now): > > public final void onValidate(final FormComponent

Re: [Wicket-user] New RequiredValidator and DropDownChoice

2006-02-19 Thread Johan Compagner
the changes that where made where wrong anyway.I think this will handle most situations.. (especially components not disabled in wicket but only in html, which could be pretty common)johan On 2/19/06, Eelco Hillenius <[EMAIL PROTECTED]> wrote: Do the other devs agree with the fix? I especially woul

Re: [Wicket-user] New RequiredValidator and DropDownChoice

2006-02-19 Thread Eelco Hillenius
Do the other devs agree with the fix? I especially would like opinions about enabled. Eelco --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes se

Re: [Wicket-user] New RequiredValidator and DropDownChoice

2006-02-19 Thread Ingram Chen
I play with new fix and all of my use cases passed ! Great !Thanks a lot.On 2/19/06, Eelco Hillenius < [EMAIL PROTECTED]> wrote:Ok, I think this is the right fix (it's in HEAD now): public final void onValidate(final FormComponent formComponent, finalString value){//

Re: [Wicket-user] New RequiredValidator and DropDownChoice

2006-02-18 Thread Eelco Hillenius
Ok, I think this is the right fix (it's in HEAD now): public final void onValidate(final FormComponent formComponent, final String value) { // Check value only if form component is enabled if (!formComponent.isEnabled()) {

Re: [Wicket-user] New RequiredValidator and DropDownChoice

2006-02-18 Thread Eelco Hillenius
Uh, another potential nastier problem is that you put in disabled="disabled" there yourself either directly or with an attribute modifier. In that case, the old code makes sense, though it is not very generic. H... what should we do... Eelco On 2/18/06, Eelco Hillenius <[EMAIL PROTECTED]> wro

Re: [Wicket-user] New RequiredValidator and DropDownChoice

2006-02-18 Thread Eelco Hillenius
A potential, theoretic issue can be that isEnabled is based on an algoritm in such a way that it was false during rendering, but true now that the post back comes in. Or the other way around. But I think that is too theoretical to worry about, and even if it would show up sometime, somewhere for an

Re: [Wicket-user] New RequiredValidator and DropDownChoice

2006-02-18 Thread Eelco Hillenius
I just took a look, and the 'fix' that isInputNullable was wrong; it was fixing the wrong problem in the first place. I removed that method again, and RequiredValidator now looks like: public final void onValidate(final FormComponent formComponent, final String value) {

[Wicket-user] New RequiredValidator and DropDownChoice

2006-02-18 Thread Ingram Chen
Latest RequiredValidator only works for FormComponent.isInputNullable() that return true.So basically RequiredValidator no longer work for FormComponent like DropDownChoice . I have one use case: the choices List may return zero size, and by default, DropDownChoice will insert a Choose One... for