Re: How to customize/override .CSS of 3rd party component

2009-07-23 Thread Petr Fejfar
On Thu, Jul 23, 2009 at 11:45 AM, Mathias
Nilssonwicket.program...@gmail.com wrote:


 You could extends the component, create own markup and css.

Really: there is the getCssClass() method supplying class name of style...
Thanks for prompt reply.


 You can also just look at the css and then in the header of your class add
 override them.

If I didn't miss anything, it does not work (even if it should) - this
is probably due
run-time loading of .css file by JavaScript e.g. on load my internal
style is used,
but on page refresh and/or menu click, it is replaced by original one.

Petr








 Let´s say YUI have a css class of .menu.

 style type=text/css
  .menu{
    color: red;
  }
 /style
 --
 View this message in context: 
 http://www.nabble.com/How-to-customize-override-.CSS-of-3rd-party-component-tp24622417p24622529.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: How to customize/override .CSS of 3rd party component

2009-07-23 Thread Mathias Nilsson

That's odd. I works for alot of components I use.

I don't exactly know which component you are trying to implement but what
about.

add( new YUIMenu( id ){
   @Override
   protected void onBeforeRender() {
 super.onBeforeRender();
// Add css reference here or something else
  }
});
-- 
View this message in context: 
http://www.nabble.com/How-to-customize-override-.CSS-of-3rd-party-component-tp24622417p24623102.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to customize/override .CSS of 3rd party component

2009-07-23 Thread Petr Fejfar
On Thu, Jul 23, 2009 at 12:26 PM, Mathias
Nilssonwicket.program...@gmail.com wrote:

 I don't exactly know which component you are trying to implement but what
 about.

 add( new YUIMenu( id ){
   @Override
   protected void onBeforeRender() {
     super.onBeforeRender();
    // Add css reference here or something else
  }
 });

I'm violating YuiMenuBar :-)

Overriding getCssClass() method did the job - it allows to change
root class name of all Yui menu hierarchy hence I can introduce my
own styles in another .css file.

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



Re: How to customize/override .CSS of 3rd party component

2009-07-23 Thread Mathias Nilsson

Ok,

You might want to google for YUI skins and take a look at
YuiHeaderContributor 
-- 
View this message in context: 
http://www.nabble.com/How-to-customize-override-.CSS-of-3rd-party-component-tp24622417p24623391.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to customize/override .CSS of 3rd party component

2009-07-23 Thread Petr Fejfar
 You might want to google for YUI skins and take a look at
 YuiHeaderContributor

OK. Thanks for hint - I'll probably use YuiHeader Contributor.

Petr

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