Well the nice thing was that I don't need to define the selectors statically somewhere f.e. the selectors for tomahawk are made on this rule: mf|fully_qualified_component_Class::style_property_name:css_pseudo_class
mf - is the prefix from MyFaces fully_qualified_component_Class - is the full class name with the '.' replaced with "_" style_property_name - is the property name without the 'Class' / 'StyleClass' suffix css_pseudo_class - is a normal css pseudo class i.e. ':hover' here are some examples: mf|org_apache_myfaces_component_html_ext_HtmlDataTable::header mf|javax_faces_component_html_HtmlCommandLink:hover well, first this solution is not perfect but it already offers very much of the functionality for EVERY COMPONENT you can also extend the Renderer for particular components about the properties ending in Class but not being a StyleClass property the only thing you shouldn't do is declare that selector in the skin about properties with style classes list (rowClasses, columnClasses) it's very simple : you can define the selectors with the suffix rowClass1,rowClass2, ... for any uncommon skinning behavior, you just have to extend the base renderer thanks for info / questions Cristi Toth ------------- Codebeat www.codebeat.ro On 8/1/07, Leonardo Uribe <[EMAIL PROTECTED]> wrote: > > Hi Cristi > > In order to give you feedback, and gain some feedback too, I have some > comments and questions about this topic: > > You wrote: > > my approach was also Decorating existing renderers > but for Tomahawk, I did one generic Renderer for all components, based on > reflection > it just searches for any "Class' or 'StyleClass' ending properties in the > component > and if it finds them then it searches for their name in the defined > selectors and sets the appropriate styleClasses into the component > > It sounds good, I started doing something similiar, but there are some > components that use class ending properties for another uses different to > CSS classes. By example: > > - s:graphicImage ( imageRendererClass ) > - s:outputLinkDynamic ( resourceRendererClass ) > > Fortunately, only these two components have this problem. The question is > how to avoid use this fields as CSS class properties? > > I have found other things like this: > > Suppose you want to skin properties in h:dataTable like rowClasses and > columnClasses. The first approach is doing the same like in other > properties. But It has its drawbacks. This properties are a list of comma > separated CSS classes. How do you plan to skin this? > > Take a look at t:column and t:columns component. This component does not > have a renderer!!!. You have to put the code inside the class that decorate > the render of t:dataTable and s:autoUpdateDataTable. How to skin this > component? > > And the final question: How do you find the selector? how a component > selector looks like? > > I hope that this contribute to you project. > > regards > > Att: Leonardo Uribe > >
