如何在后备UIComponent中访问Composite Component属性值? [英] How to access Composite Component attribute values in the backing UIComponent?

查看:142
本文介绍了如何在后备UIComponent中访问Composite Component属性值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们可以在#{cc.attrs.attributeName}

我们如何在支持组件中访问此值?

How can we access this value in the backing component?

推荐答案

它只能在任何内部使用继承的方法 getAttributes() 方法返回 Map< String,Object> with属性名称为地图键,属性值为地图值。

It's just available inside any of the methods by the inherited getAttributes() method which returns a Map<String, Object> with the attribute name as map key and attribute value as map value.

Bar bar = (Bar) getAttributes().get("bar");
// ...

这篇关于如何在后备UIComponent中访问Composite Component属性值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆