You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Martijn Lindhout <ml...@jointeffort.nl> on 2008/01/23 08:22:35 UTC

Reusable component and customization

Hi,

I just build a simple reusable shoppingcart component with a reasonable
default CSS style. The markup, css and images are all packaged resources.

How do I enable users of my component to override the default styling? What
is the wicket way besides subclassing the CartPanel component and providing
a custom markup?

Regards,

-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
mlindhout@jointeffort.nl
+31 (0)6 18 47 25 29

Re: Reusable component and customization

Posted by Martijn Lindhout <ml...@jointeffort.nl>.
sure, that's a simple one. Maybe I'll use that.

2008/1/23, Igor Vaynberg <ig...@gmail.com>:
>
> why do you need to reference it at all?
>
> i am saying your panel should not include any links to css files by
> default. that way the user of your panel will include their own css
> files however they like...they probably already include a css file for
> all their pages, maybe all they do is add class definitions that are
> in your shopping cart to that one css file....
>
> -igor
>
>
> On Jan 23, 2008 10:56 AM, Martijn Lindhout <ml...@jointeffort.nl>
> wrote:
> > how do I reference such a CSS?
> >
> > 2008/1/23, Igor Vaynberg <ig...@gmail.com>:
> > >
> >
> > > heh, if its just a css reference then why have your component include
> > > a default one at all? let the user style it however they like by
> > > including their own css files.
> > >
> > > -igor
> > >
> > >
> > > On Jan 23, 2008 1:33 AM, Martijn Lindhout <ml...@jointeffort.nl>
> > > wrote:
> > > > that makes sense.
> > > >
> > > > 2008/1/23, Eelco Hillenius <ee...@gmail.com>:
> > > >
> > > > >
> > > > > On Jan 23, 2008 1:12 AM, Dmitry Kandalov <no...@gmail.com>
> wrote:
> > > > > > On Wednesday 23 January 2008 12:55:17 Martijn Lindhout wrote:
> > > > > > > I like that one with the ResourceReference. What about
> providing a
> > > > > setter
> > > > > > > on the component, so that no subclassing is needed?
> > > > > >
> > > > > > IMO setter or constructor parameter should be ok, though Wicket
> > > classes
> > > > > use
> > > > > > getters (probably to reduce session size?).
> > > > >
> > > > > Yep, we often work with overridable methods instead of properties
> > > > > because it saves memory. Probably not something you have to worry
> too
> > > > > much about when you create your custom components, but especially
> for
> > > > > the Wicket basic components, this can make quite the difference.
> > > > >
> > > > > Eelco
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Martijn Lindhout
> > > > JointEffort IT Services
> > > > http://www.jointeffort.nl
> > > > mlindhout@jointeffort.nl
> > > > +31 (0)6 18 47 25 29
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> >
> > --
> > Martijn Lindhout
> > JointEffort IT Services
> > http://www.jointeffort.nl
> > mlindhout@jointeffort.nl
> > +31 (0)6 18 47 25 29
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
mlindhout@jointeffort.nl
+31 (0)6 18 47 25 29

Re: Reusable component and customization

Posted by Igor Vaynberg <ig...@gmail.com>.
why do you need to reference it at all?

i am saying your panel should not include any links to css files by
default. that way the user of your panel will include their own css
files however they like...they probably already include a css file for
all their pages, maybe all they do is add class definitions that are
in your shopping cart to that one css file....

-igor


On Jan 23, 2008 10:56 AM, Martijn Lindhout <ml...@jointeffort.nl> wrote:
> how do I reference such a CSS?
>
> 2008/1/23, Igor Vaynberg <ig...@gmail.com>:
> >
>
> > heh, if its just a css reference then why have your component include
> > a default one at all? let the user style it however they like by
> > including their own css files.
> >
> > -igor
> >
> >
> > On Jan 23, 2008 1:33 AM, Martijn Lindhout <ml...@jointeffort.nl>
> > wrote:
> > > that makes sense.
> > >
> > > 2008/1/23, Eelco Hillenius <ee...@gmail.com>:
> > >
> > > >
> > > > On Jan 23, 2008 1:12 AM, Dmitry Kandalov <no...@gmail.com> wrote:
> > > > > On Wednesday 23 January 2008 12:55:17 Martijn Lindhout wrote:
> > > > > > I like that one with the ResourceReference. What about providing a
> > > > setter
> > > > > > on the component, so that no subclassing is needed?
> > > > >
> > > > > IMO setter or constructor parameter should be ok, though Wicket
> > classes
> > > > use
> > > > > getters (probably to reduce session size?).
> > > >
> > > > Yep, we often work with overridable methods instead of properties
> > > > because it saves memory. Probably not something you have to worry too
> > > > much about when you create your custom components, but especially for
> > > > the Wicket basic components, this can make quite the difference.
> > > >
> > > > Eelco
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Martijn Lindhout
> > > JointEffort IT Services
> > > http://www.jointeffort.nl
> > > mlindhout@jointeffort.nl
> > > +31 (0)6 18 47 25 29
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
> --
> Martijn Lindhout
> JointEffort IT Services
> http://www.jointeffort.nl
> mlindhout@jointeffort.nl
> +31 (0)6 18 47 25 29
>

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


Re: Reusable component and customization

Posted by Martijn Lindhout <ml...@jointeffort.nl>.
how do I reference such a CSS?

2008/1/23, Igor Vaynberg <ig...@gmail.com>:
>
> heh, if its just a css reference then why have your component include
> a default one at all? let the user style it however they like by
> including their own css files.
>
> -igor
>
>
> On Jan 23, 2008 1:33 AM, Martijn Lindhout <ml...@jointeffort.nl>
> wrote:
> > that makes sense.
> >
> > 2008/1/23, Eelco Hillenius <ee...@gmail.com>:
> >
> > >
> > > On Jan 23, 2008 1:12 AM, Dmitry Kandalov <no...@gmail.com> wrote:
> > > > On Wednesday 23 January 2008 12:55:17 Martijn Lindhout wrote:
> > > > > I like that one with the ResourceReference. What about providing a
> > > setter
> > > > > on the component, so that no subclassing is needed?
> > > >
> > > > IMO setter or constructor parameter should be ok, though Wicket
> classes
> > > use
> > > > getters (probably to reduce session size?).
> > >
> > > Yep, we often work with overridable methods instead of properties
> > > because it saves memory. Probably not something you have to worry too
> > > much about when you create your custom components, but especially for
> > > the Wicket basic components, this can make quite the difference.
> > >
> > > Eelco
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> >
> >
> > --
> > Martijn Lindhout
> > JointEffort IT Services
> > http://www.jointeffort.nl
> > mlindhout@jointeffort.nl
> > +31 (0)6 18 47 25 29
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
mlindhout@jointeffort.nl
+31 (0)6 18 47 25 29

Re: Reusable component and customization

Posted by Igor Vaynberg <ig...@gmail.com>.
heh, if its just a css reference then why have your component include
a default one at all? let the user style it however they like by
including their own css files.

-igor


On Jan 23, 2008 1:33 AM, Martijn Lindhout <ml...@jointeffort.nl> wrote:
> that makes sense.
>
> 2008/1/23, Eelco Hillenius <ee...@gmail.com>:
>
> >
> > On Jan 23, 2008 1:12 AM, Dmitry Kandalov <no...@gmail.com> wrote:
> > > On Wednesday 23 January 2008 12:55:17 Martijn Lindhout wrote:
> > > > I like that one with the ResourceReference. What about providing a
> > setter
> > > > on the component, so that no subclassing is needed?
> > >
> > > IMO setter or constructor parameter should be ok, though Wicket classes
> > use
> > > getters (probably to reduce session size?).
> >
> > Yep, we often work with overridable methods instead of properties
> > because it saves memory. Probably not something you have to worry too
> > much about when you create your custom components, but especially for
> > the Wicket basic components, this can make quite the difference.
> >
> > Eelco
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
>
> --
> Martijn Lindhout
> JointEffort IT Services
> http://www.jointeffort.nl
> mlindhout@jointeffort.nl
> +31 (0)6 18 47 25 29
>

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


Re: Reusable component and customization

Posted by Martijn Lindhout <ml...@jointeffort.nl>.
that makes sense.

2008/1/23, Eelco Hillenius <ee...@gmail.com>:
>
> On Jan 23, 2008 1:12 AM, Dmitry Kandalov <no...@gmail.com> wrote:
> > On Wednesday 23 January 2008 12:55:17 Martijn Lindhout wrote:
> > > I like that one with the ResourceReference. What about providing a
> setter
> > > on the component, so that no subclassing is needed?
> >
> > IMO setter or constructor parameter should be ok, though Wicket classes
> use
> > getters (probably to reduce session size?).
>
> Yep, we often work with overridable methods instead of properties
> because it saves memory. Probably not something you have to worry too
> much about when you create your custom components, but especially for
> the Wicket basic components, this can make quite the difference.
>
> Eelco
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
mlindhout@jointeffort.nl
+31 (0)6 18 47 25 29

Re: Reusable component and customization

Posted by Eelco Hillenius <ee...@gmail.com>.
On Jan 23, 2008 1:12 AM, Dmitry Kandalov <no...@gmail.com> wrote:
> On Wednesday 23 January 2008 12:55:17 Martijn Lindhout wrote:
> > I like that one with the ResourceReference. What about providing a setter
> > on the component, so that no subclassing is needed?
>
> IMO setter or constructor parameter should be ok, though Wicket classes use
> getters (probably to reduce session size?).

Yep, we often work with overridable methods instead of properties
because it saves memory. Probably not something you have to worry too
much about when you create your custom components, but especially for
the Wicket basic components, this can make quite the difference.

Eelco

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


Re: Reusable component and customization

Posted by Dmitry Kandalov <no...@gmail.com>.
On Wednesday 23 January 2008 12:55:17 Martijn Lindhout wrote:
> I like that one with the ResourceReference. What about providing a setter
> on the component, so that no subclassing is needed?

IMO setter or constructor parameter should be ok, though Wicket classes use 
getters (probably to reduce session size?).

Dima

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


Re: Reusable component and customization

Posted by Martijn Lindhout <ml...@jointeffort.nl>.
I like that one with the ResourceReference. What about providing a setter on
the component, so that no subclassing is needed?

2008/1/23, Dmitry Kandalov <no...@gmail.com>:
>
> On Wednesday 23 January 2008 11:47:26 Martijn Lindhout wrote:
> > users need to open the jar, pick the right markup file, copy it, changes
> > css attributes, etc. That's not what I expect from component reuse,
> right?
> > Or do I miss something?
>
> The other option is to create overridable methods which provide styling.
> Like
> FeedbackPanel#getCSSClass() or BaseTree#getCSS().
>
> Dima
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
mlindhout@jointeffort.nl
+31 (0)6 18 47 25 29

Re: Reusable component and customization

Posted by Dmitry Kandalov <no...@gmail.com>.
On Wednesday 23 January 2008 11:47:26 Martijn Lindhout wrote:
> users need to open the jar, pick the right markup file, copy it, changes
> css attributes, etc. That's not what I expect from component reuse, right?
> Or do I miss something?

The other option is to create overridable methods which provide styling. Like 
FeedbackPanel#getCSSClass() or BaseTree#getCSS().

Dima

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


Re: Reusable component and customization

Posted by Timo Rantalaiho <Ti...@ri.fi>.
On Tue, 22 Jan 2008, Igor Vaynberg wrote:
> a) read javadoc
> b) create subclass (1 min)
> c) paste example markup from javadoc into subclass.html file (1 min)
> c) edit subclass.html

What I do is

a) create Subclass (10 seconds)
b) click to the Superclass in IDE
c) click to Superclass.html that is next to Superclass.java
d) copy, paste, go home (30 sec)

...that being said, it's not that easy when the component
instantiates various other components that you want to
customise. 

Best wishes,
Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

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


Re: Reusable component and customization

Posted by Igor Vaynberg <ig...@gmail.com>.
a) read javadoc
b) create subclass (1 min)
c) paste example markup from javadoc into subclass.html file (1 min)
c) edit subclass.html

the only overhead is two minutes, or am i missing something?

-igor


On Jan 22, 2008 11:47 PM, Martijn Lindhout <ml...@jointeffort.nl> wrote:
> users need to open the jar, pick the right markup file, copy it, changes css
> attributes, etc. That's not what I expect from component reuse, right? Or do
> I miss something?
>
>
>
>
> 2008/1/23, Igor Vaynberg <ig...@gmail.com>:
> >
> > what internals do they need to know to create a subclsas?
> >
> > -igor
> >
> > On Jan 22, 2008 11:40 PM, Martijn Lindhout <ml...@jointeffort.nl>
> > wrote:
> > > well, then the users of my the component need to know the internals of
> > the
> > > component. That's not what I want, or at least reduce it to the minimum.
> > >
> > > 2008/1/23, Igor Vaynberg <ig...@gmail.com>:
> > >
> > > >
> > > > whats wrong with subclassing and providing your own markup?
> > > >
> > > > -igor
> > > >
> > > > On Jan 22, 2008 11:22 PM, Martijn Lindhout <ml...@jointeffort.nl>
> > > > wrote:
> > > > > Hi,
> > > > >
> > > > > I just build a simple reusable shoppingcart component with a
> > reasonable
> > > > > default CSS style. The markup, css and images are all packaged
> > > > resources.
> > > > >
> > > > > How do I enable users of my component to override the default
> > styling?
> > > > What
> > > > > is the wicket way besides subclassing the CartPanel component and
> > > > providing
> > > > > a custom markup?
> > > > >
> > > > > Regards,
> > > > >
> > > > > --
> > > > > Martijn Lindhout
> > > > > JointEffort IT Services
> > > > > http://www.jointeffort.nl
> > > > > mlindhout@jointeffort.nl
> > > > > +31 (0)6 18 47 25 29
> > > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > > For additional commands, e-mail: users-help@wicket.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > >
> > > Martijn Lindhout
> > > JointEffort IT Services
> > > http://www.jointeffort.nl
> > > mlindhout@jointeffort.nl
> > > +31 (0)6 18 47 25 29
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
> --
> Martijn Lindhout
> JointEffort IT Services
> http://www.jointeffort.nl
> mlindhout@jointeffort.nl
> +31 (0)6 18 47 25 29
>

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


Re: Reusable component and customization

Posted by Martijn Lindhout <ml...@jointeffort.nl>.
users need to open the jar, pick the right markup file, copy it, changes css
attributes, etc. That's not what I expect from component reuse, right? Or do
I miss something?



2008/1/23, Igor Vaynberg <ig...@gmail.com>:
>
> what internals do they need to know to create a subclsas?
>
> -igor
>
> On Jan 22, 2008 11:40 PM, Martijn Lindhout <ml...@jointeffort.nl>
> wrote:
> > well, then the users of my the component need to know the internals of
> the
> > component. That's not what I want, or at least reduce it to the minimum.
> >
> > 2008/1/23, Igor Vaynberg <ig...@gmail.com>:
> >
> > >
> > > whats wrong with subclassing and providing your own markup?
> > >
> > > -igor
> > >
> > > On Jan 22, 2008 11:22 PM, Martijn Lindhout <ml...@jointeffort.nl>
> > > wrote:
> > > > Hi,
> > > >
> > > > I just build a simple reusable shoppingcart component with a
> reasonable
> > > > default CSS style. The markup, css and images are all packaged
> > > resources.
> > > >
> > > > How do I enable users of my component to override the default
> styling?
> > > What
> > > > is the wicket way besides subclassing the CartPanel component and
> > > providing
> > > > a custom markup?
> > > >
> > > > Regards,
> > > >
> > > > --
> > > > Martijn Lindhout
> > > > JointEffort IT Services
> > > > http://www.jointeffort.nl
> > > > mlindhout@jointeffort.nl
> > > > +31 (0)6 18 47 25 29
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > > For additional commands, e-mail: users-help@wicket.apache.org
> > >
> > >
> >
> >
> > --
> >
> > Martijn Lindhout
> > JointEffort IT Services
> > http://www.jointeffort.nl
> > mlindhout@jointeffort.nl
> > +31 (0)6 18 47 25 29
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
mlindhout@jointeffort.nl
+31 (0)6 18 47 25 29

Re: Reusable component and customization

Posted by Igor Vaynberg <ig...@gmail.com>.
what internals do they need to know to create a subclsas?

-igor

On Jan 22, 2008 11:40 PM, Martijn Lindhout <ml...@jointeffort.nl> wrote:
> well, then the users of my the component need to know the internals of the
> component. That's not what I want, or at least reduce it to the minimum.
>
> 2008/1/23, Igor Vaynberg <ig...@gmail.com>:
>
> >
> > whats wrong with subclassing and providing your own markup?
> >
> > -igor
> >
> > On Jan 22, 2008 11:22 PM, Martijn Lindhout <ml...@jointeffort.nl>
> > wrote:
> > > Hi,
> > >
> > > I just build a simple reusable shoppingcart component with a reasonable
> > > default CSS style. The markup, css and images are all packaged
> > resources.
> > >
> > > How do I enable users of my component to override the default styling?
> > What
> > > is the wicket way besides subclassing the CartPanel component and
> > providing
> > > a custom markup?
> > >
> > > Regards,
> > >
> > > --
> > > Martijn Lindhout
> > > JointEffort IT Services
> > > http://www.jointeffort.nl
> > > mlindhout@jointeffort.nl
> > > +31 (0)6 18 47 25 29
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> > For additional commands, e-mail: users-help@wicket.apache.org
> >
> >
>
>
> --
>
> Martijn Lindhout
> JointEffort IT Services
> http://www.jointeffort.nl
> mlindhout@jointeffort.nl
> +31 (0)6 18 47 25 29
>

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


Re: Reusable component and customization

Posted by Martijn Lindhout <ml...@jointeffort.nl>.
well, then the users of my the component need to know the internals of the
component. That's not what I want, or at least reduce it to the minimum.

2008/1/23, Igor Vaynberg <ig...@gmail.com>:
>
> whats wrong with subclassing and providing your own markup?
>
> -igor
>
> On Jan 22, 2008 11:22 PM, Martijn Lindhout <ml...@jointeffort.nl>
> wrote:
> > Hi,
> >
> > I just build a simple reusable shoppingcart component with a reasonable
> > default CSS style. The markup, css and images are all packaged
> resources.
> >
> > How do I enable users of my component to override the default styling?
> What
> > is the wicket way besides subclassing the CartPanel component and
> providing
> > a custom markup?
> >
> > Regards,
> >
> > --
> > Martijn Lindhout
> > JointEffort IT Services
> > http://www.jointeffort.nl
> > mlindhout@jointeffort.nl
> > +31 (0)6 18 47 25 29
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


-- 
Martijn Lindhout
JointEffort IT Services
http://www.jointeffort.nl
mlindhout@jointeffort.nl
+31 (0)6 18 47 25 29

Re: Reusable component and customization

Posted by Igor Vaynberg <ig...@gmail.com>.
whats wrong with subclassing and providing your own markup?

-igor

On Jan 22, 2008 11:22 PM, Martijn Lindhout <ml...@jointeffort.nl> wrote:
> Hi,
>
> I just build a simple reusable shoppingcart component with a reasonable
> default CSS style. The markup, css and images are all packaged resources.
>
> How do I enable users of my component to override the default styling? What
> is the wicket way besides subclassing the CartPanel component and providing
> a custom markup?
>
> Regards,
>
> --
> Martijn Lindhout
> JointEffort IT Services
> http://www.jointeffort.nl
> mlindhout@jointeffort.nl
> +31 (0)6 18 47 25 29
>

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


Re: Reusable component and customization

Posted by Johan Compagner <jc...@gmail.com>.
If it is just css then what you could do is an overridable method
getCSS that returns a ResourceReference that you add to your
component.

On 1/23/08, Martijn Lindhout <ml...@jointeffort.nl> wrote:
> Hi,
>
> I just build a simple reusable shoppingcart component with a reasonable
> default CSS style. The markup, css and images are all packaged resources.
>
> How do I enable users of my component to override the default styling? What
> is the wicket way besides subclassing the CartPanel component and providing
> a custom markup?
>
> Regards,
>
> --
> Martijn Lindhout
> JointEffort IT Services
> http://www.jointeffort.nl
> mlindhout@jointeffort.nl
> +31 (0)6 18 47 25 29
>

-- 
Sent from Gmail for mobile | mobile.google.com

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