Getting tabindex value for UIComponent
I'd like to get tabindex
of cur开发者_运维知识库rent UIComponent
in generic way. getTabIndex()
is available only for few components. Is there any way of getting it without casting component to proper type?
I was thinking about getting tabindex
attribute for current component but how to to this?
Use UIComponent#getAttributes()
.
Object tabindex = component.getAttributes().get("tabindex");
if (tabindex != null) {
// ...
}
精彩评论