You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Joshua Jackson <jo...@gmail.com> on 2007/11/21 12:59:01 UTC

Create custom component

Dear all,

Is there any tutorial on creating custom component in Wicket? The ones
I found only shows creating custom component by extending from the
existing component but not creating from scratch. If anyone has
created those tutorial, can anyone here please point me to there.

Thanks in advance

-- 
What you want today, may not exist tommorrow

Blog: http://joshuajava.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Create custom component

Posted by Eelco Hillenius <ee...@gmail.com>.
On Nov 21, 2007 9:12 PM, Joshua Jackson <jo...@gmail.com> wrote:
> Hi Eelco,
>
> Thanks for the response.
> Maybe tutorial doesn't sound good, but I think this kind of
> information you've written here is important and worth written on the
> wicket wiki.

Go for it :-)

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Create custom component

Posted by Joshua Jackson <jo...@gmail.com>.
Hi Eelco,

Thanks for the response.
Maybe tutorial doesn't sound good, but I think this kind of
information you've written here is important and worth written on the
wicket wiki.

Thanks.

On 11/22/07, Eelco Hillenius <ee...@gmail.com> wrote:
> It doesn't make sense to have such a tutorial. You need to decide what
> you'll be building and what base class comes closest to what you want.
> WebComponent is the absolute base class (for web applications) that
> don't nest other components (Labels) and WebMarkupContainer is the
> base for pretty much anything else. If you need markup attached, you
> would start with Panel or Border, and if your component needs to work
> in a form, you would extend from at least FormComponent. And then
> there is Repeater for anything that 'repeats' and the tree base
> classes. All very different cases, but what they have in common is
> that you just extend their Java classes, customize by looking at their
> APIs (particularly at what abstract/ protected methods there are) and
> maybe plugin some behaviors.

-- 
What you want today, may not exist tommorrow

Blog: http://joshuajava.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Create custom component

Posted by Eelco Hillenius <ee...@gmail.com>.
On Nov 21, 2007 7:50 PM, Joshua Jackson <jo...@gmail.com> wrote:
> Yes that's what I mean, I couldn't find document on creating custom
> component that extend from Component.

It doesn't make sense to have such a tutorial. You need to decide what
you'll be building and what base class comes closest to what you want.
WebComponent is the absolute base class (for web applications) that
don't nest other components (Labels) and WebMarkupContainer is the
base for pretty much anything else. If you need markup attached, you
would start with Panel or Border, and if your component needs to work
in a form, you would extend from at least FormComponent. And then
there is Repeater for anything that 'repeats' and the tree base
classes. All very different cases, but what they have in common is
that you just extend their Java classes, customize by looking at their
APIs (particularly at what abstract/ protected methods there are) and
maybe plugin some behaviors.

Eelco

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Create custom component

Posted by Joshua Jackson <jo...@gmail.com>.
Yes that's what I mean, I couldn't find document on creating custom
component that extend from Component.

Ok I'm gonna try looking at the existing component and try build my
own component from there.

Thanks.

On 11/22/07, Timo Rantalaiho <Ti...@ri.fi> wrote:
> On Wed, 21 Nov 2007, Joshua Jackson wrote:
> > Is there any tutorial on creating custom component in Wicket? The ones
> > I found only shows creating custom component by extending from the
> > existing component but not creating from scratch. If anyone has
>
> What do you mean by "from scratch"? All Wicket components
> extend Component.
>
> You could just look at any existing Wicket component, it's
> anyway a good idea to have Wicket sources attached to your
> IDE and they are all there.
>
> Best wishes,
> Timo


-- 
What you want today, may not exist tommorrow

Blog: http://joshuajava.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Create custom component

Posted by Timo Rantalaiho <Ti...@ri.fi>.
On Wed, 21 Nov 2007, Joshua Jackson wrote:
> Is there any tutorial on creating custom component in Wicket? The ones
> I found only shows creating custom component by extending from the
> existing component but not creating from scratch. If anyone has

What do you mean by "from scratch"? All Wicket components
extend Component.

You could just look at any existing Wicket component, it's
anyway a good idea to have Wicket sources attached to your 
IDE and they are all there.

Best wishes,
Timo


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org