NetBeans Visual Web Components: Override styleClass
[Note that this is a cross-post from the Java Development Tools forum]
First off, I would like to commend the NetBeans Team on the outstanding job they have done in making NetBeans a 'first class' IDE for web development. As a 12 year MS Visual Studio developer, I don't say this lightly. OK, on to my question... I authored a global header Page Fragment and associated style sheet. When I select a visual component (Basic) and set its styleClass from the StyleClass Window, the rendered page never applies the css class:
<span class="searchbox" id="tbsearch"><input class="TxtFld_sun4" id="tbsearch_field" name="tbsearch_field" size="20" type="text" value="" />
My css class is 'searchbox'. The textbox input element constantly defaults to the 'TxtFld_sun4' css class. So to check if I was going crazy I renamed my 'searchbox' class to the 'TxtFld_sun4' class. At this point the textbox rendered as I wanted. But the problem is if I have to override this 'TxtFld_sun4' global class all visual components that use this css class name will render the same (i.e. like a header search box). Can I apply a custom class to a specific visual component without affecting its default global class?