Html <span> elements can have onClick, onBlur, and lots of other events, as well. People will probably end up having to attach this behavior manually.
This makes me wonder: Do we have a mechanism for attaching behaviors to "snippits" of HTML (more than links and buttons, say, divs / spans) on the output page, or do we need to address that as well? I see a use for being able to attach behaviors to any element on the HTML page.
The next question is: Do we need such a mechanism? That's, for the most part, the kind of behavior that a library like JQuery would provide, though we lose the hooks into JSF that come with behaviors.
--Lincoln
Hey Matthias -I believe that the answer is that we only exposed ClientBehavior events/attach points for cases where components already exposed DOM event handlers. Since h:outputText does not expose any DOM event handlers (eg. no "onMouseover" attribute), we didn't surface any ClientBehavior attach points either. So, a related question is whether h:outputText should expose attributes for all of the relevant DOM event handlers. Personally I don't see much value in this - would prefer to keep h:outputText small/simple - but I am open to discussion on this point.
Why is HtmlOutputText not a ClientBehaviorHolder ?
Andy