Re: Selectively ignoring required fields

2009-09-29 Thread Phil Housley
: Phil Housley undeconstruc...@gmail.com To: users@wicket.apache.org Sent: Tuesday, September 15, 2009 3:37 PM Subject: Re: Selectively ignoring required fields Several interesting ideas, but they all seem to involve more invasive changes than I really want to make - either changing

Selectively ignoring required fields

2009-09-15 Thread Phil Housley
Hello, I'm currently working on a search interface, where the required-ness of some fields depends on the value of some other. In particular, the form looks something like (+) search by X a: [_] b: [_] () search by Y ... () search by Z ... So the radio button selects a group of

Re: Selectively ignoring required fields

2009-09-15 Thread Martin Makundi
You can override isRequired for any component. ** Martin 2009/9/15 Phil Housley undeconstruc...@gmail.com: Hello, I'm currently working on a search interface, where the required-ness of some fields depends on the value of some other.  In particular, the form looks something like (+)

Re: Selectively ignoring required fields

2009-09-15 Thread Phil Housley
2009/9/15 Martin Makundi martin.maku...@koodaripalvelut.com: You can override isRequired for any component. ** Martin Thanks, but I really don't want to have to make the individual fields context aware unless I have to. We have quite a few custom form controls, which are used both in

Re: Selectively ignoring required fields

2009-09-15 Thread Matthias Keller
Hi You could also write your own FormValidator which does the 'required' validation on its own by checking whether the field's input string is empty/null. Matt Phil Housley wrote: 2009/9/15 Martin Makundi martin.maku...@koodaripalvelut.com: You can override isRequired for any

Re: Selectively ignoring required fields

2009-09-15 Thread Bas Gooren
- Original Message - From: Phil Housley undeconstruc...@gmail.com To: users@wicket.apache.org Sent: Tuesday, September 15, 2009 2:30 PM Subject: Re: Selectively ignoring required fields 2009/9/15 Martin Makundi martin.maku...@koodaripalvelut.com: You can override isRequired for any component

Re: Selectively ignoring required fields

2009-09-15 Thread Martin Makundi
It is easier just to make your own components, say CentrallyControlledRequiredCheckBox extends CheckBox etc. In this way you can put your central code into CentrallyControlledRequiredCheckBox and reuse that component. There cannot be an easier way... how difficult is that anyways? ** Martin

Re: Selectively ignoring required fields

2009-09-15 Thread Phil Housley
ignoring required fields 2009/9/15 Martin Makundi martin.maku...@koodaripalvelut.com: You can override isRequired for any component. ** Martin Thanks, but I really don't want to have to make the individual fields context aware unless I have to.  We have quite a few custom form controls

Re: Selectively ignoring required fields

2009-09-15 Thread Bas Gooren
: Selectively ignoring required fields Several interesting ideas, but they all seem to involve more invasive changes than I really want to make - either changing component classes or changing values of components at process time, which would be hard to undo (and maybe not possible, as some components

Re: Selectively ignoring required fields

2009-09-15 Thread Martin Makundi
      super.validate();   } } Regards, Bas - Original Message - From: Phil Housley undeconstruc...@gmail.com To: users@wicket.apache.org Sent: Tuesday, September 15, 2009 2:30 PM Subject: Re: Selectively ignoring required fields 2009/9/15 Martin Makundi martin.maku

Re: Selectively ignoring required fields

2009-09-15 Thread Phil Housley
- From: Phil Housley undeconstruc...@gmail.com To: users@wicket.apache.org Sent: Tuesday, September 15, 2009 3:37 PM Subject: Re: Selectively ignoring required fields Several interesting ideas, but they all seem to involve more invasive changes than I really want to make - either

Re: Selectively ignoring required fields

2009-09-15 Thread Pedro Santos
(); } } Regards, Bas - Original Message - From: Phil Housley undeconstruc...@gmail.com To: users@wicket.apache.org Sent: Tuesday, September 15, 2009 2:30 PM Subject: Re: Selectively ignoring required fields 2009/9/15 Martin Makundi martin.maku...@koodaripalvelut.com

Re: Selectively ignoring required fields

2009-09-15 Thread John Krasnay
On Tue, Sep 15, 2009 at 03:10:51PM +0100, Phil Housley wrote: A good point, but I don't think it exactly applies in this case. What I really want is for each component to know whether it is required within a very small context. For example, a might have a criteria panel (one of the

Re: Selectively ignoring required fields

2009-09-15 Thread Pedro Santos
think it will solve the immediate problem. Phil. - Original Message - From: Phil Housley undeconstruc...@gmail.com To: users@wicket.apache.org Sent: Tuesday, September 15, 2009 3:37 PM Subject: Re: Selectively ignoring required fields Several interesting ideas