开发者

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) {
    // ...
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜