You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Vitaly Tsaplin <vi...@gmail.com> on 2008/02/26 09:43:53 UTC
Is there any consistent way to create a custom component which acts as a normal form component with validation capabilities.
Hi everyone!
I am trying to create a custom component which should be a
composite consisting of 3 text fields. It will be basically a date
picker with day, month and year fields. I have created a panel and
dropped instances of the DropDownChoice class on it. I have also
created a subclass of the Model with a listener to be able to keep a
common component's model up to date. But I am stuck with a validation.
Since my component is the Panel subclass it does not provide any
validation support. To perform a form level validation I have to
provide a list of components which once are valid will trigger my
custom component validation BUT my component is not derived from the
FormComponent. So my question is... Is there any consistent way to
create a custom component which acts as a normal form component with
validation capabilities and if yes where I can have a look at an
example?
Best regards,
Vitaly
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Is there any consistent way to create a custom component which acts as a normal form component with validation capabilities.
Posted by Gerolf Seitz <ge...@gmail.com>.
there's DateField in the wicket-datetime core project.
Gerolf
On Tue, Feb 26, 2008 at 11:44 AM, Maurice Marrink <ma...@gmail.com> wrote:
> FormComponentPanel was created for these kind of situations.
> As for the example of its use, i am not sure where to find one but i
> think it is all pretty self-explanatory
>
> Maurice
>
> On Tue, Feb 26, 2008 at 9:43 AM, Vitaly Tsaplin
> <vi...@gmail.com> wrote:
> > Hi everyone!
> >
> > I am trying to create a custom component which should be a
> > composite consisting of 3 text fields. It will be basically a date
> > picker with day, month and year fields. I have created a panel and
> > dropped instances of the DropDownChoice class on it. I have also
> > created a subclass of the Model with a listener to be able to keep a
> > common component's model up to date. But I am stuck with a validation.
> > Since my component is the Panel subclass it does not provide any
> > validation support. To perform a form level validation I have to
> > provide a list of components which once are valid will trigger my
> > custom component validation BUT my component is not derived from the
> > FormComponent. So my question is... Is there any consistent way to
> > create a custom component which acts as a normal form component with
> > validation capabilities and if yes where I can have a look at an
> > example?
> >
> > Best regards,
> > Vitaly
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: Is there any consistent way to create a custom component which acts as a normal form component with validation capabilities.
Posted by Maurice Marrink <ma...@gmail.com>.
FormComponentPanel was created for these kind of situations.
As for the example of its use, i am not sure where to find one but i
think it is all pretty self-explanatory
Maurice
On Tue, Feb 26, 2008 at 9:43 AM, Vitaly Tsaplin
<vi...@gmail.com> wrote:
> Hi everyone!
>
> I am trying to create a custom component which should be a
> composite consisting of 3 text fields. It will be basically a date
> picker with day, month and year fields. I have created a panel and
> dropped instances of the DropDownChoice class on it. I have also
> created a subclass of the Model with a listener to be able to keep a
> common component's model up to date. But I am stuck with a validation.
> Since my component is the Panel subclass it does not provide any
> validation support. To perform a form level validation I have to
> provide a list of components which once are valid will trigger my
> custom component validation BUT my component is not derived from the
> FormComponent. So my question is... Is there any consistent way to
> create a custom component which acts as a normal form component with
> validation capabilities and if yes where I can have a look at an
> example?
>
> Best regards,
> Vitaly
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org