As a general rule I recommend using the XML component builder of
JSF instead of trying to construct (or subclass) a binary component. They're easier to do and less likely to get broken due to future changes to JSF's internal architecture. JSF has a lot of evolving to do yet.
Sometimes there's no help for it, though, and you have to go binary.
In JSF2, the attributes are kept in a map that's part of the JSF element implementation, so you don't set/get them directly. As for the sordid details, I'll have to refer you to the documentation, since I have few examples lying around and none I've worked on recently. However, do pay attention when overriding any inherited attributes to the difference between direct values and EL expressions. If the attribute can be an EL expression, you have to manage the process yourself.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.