How to access Composite Component attribute values in the backing UIComponent?

落花浮王杯 提交于 2019-12-10 16:09:00

问题


We can access the Composite Component attribute values (defiled in the interface section), in the implimentation like #{cc.attrs.attributeName}

How can we access this value in the backing component?


回答1:


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");
// ...


来源:https://stackoverflow.com/questions/6888808/how-to-access-composite-component-attribute-values-in-the-backing-uicomponent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!