>But say I didn't autogenerate CSS for users. I would >tell them that my components will refer to eight CSS styles, allow them >to configure them. Now I have multiple instances of the border >component across my page and I want different styles for each one. The >only way I can do that is by differentiating by ID. How do I do that >with your approach?
Say your components uses the following css classes (c1, c2, c3, c4, c5, c6, c7, c8). Each component has its own name, say we have 3 roundcornerborders named border1, border2 and border3. All you have to do is instruct the user to make css class names by combining the component name with the css classname. E.g. border1_c1. All you have to do as developer of the component is to make sure you use attributeModifiers in your code instead of defining the class attribute in your html. And this will even work if someone want's 7 borders where 3 use the same stye and the remaining 4 each use a different style. If you name the 3 borders the same the user only needs to define 5 styles, not 7. Even your generated css can be used in the same way. Maurice -----Oorspronkelijk bericht----- Van: Gili [mailto:[EMAIL PROTECTED] Verzonden: donderdag 17 februari 2005 17:59 Aan: [email protected] Onderwerp: RE: [Wicket-develop] id of elemets and listviews On Thu, 17 Feb 2005 17:38:32 +0100, Maurice Marrink wrote: >I don't see any problem with that. >You could choose not to let the user change styles, append styles or >completely override your default style. My point is, how is he supposed to do that if he cannot refer to IDs within my component? In my case, I have a RoundCornerBorder component and it uses a whopping eight different CSS tags to allow users to customize everything about it. My current approach is to autogenerate the CSS on behalf of the user so I guess my only requirement is for me (the component builder) to know my IDs at runtime (how do I do that with your approach?). But say I didn't autogenerate CSS for users. I would tell them that my components will refer to eight CSS styles, allow them to configure them. Now I have multiple instances of the border component across my page and I want different styles for each one. The only way I can do that is by differentiating by ID. How do I do that with your approach? Gili ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Wicket-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-develop
