Welcome to the JavaRanch, Fabio!
I have no idea what you're actually trying to accomplish, but you're trying to do low-level control things when you're using a high-level framework and that's something that even people with years of experience should think twice about. In fact, my own years of experience have taught me that any complicated solution in
JSF is probably the wrong approach, since JSF was designed to make things as simple as possible.
If you're looking to control the appearance of buttons in JSF,
you should be using CSS, not code kludges. JSF doesn't concern itself with matters of style, since CSS is quite capable of doing that itself by itself.