如何在后备UIComponent中访问Composite Component属性值?

siv*_*636 4 java-ee composite-component jsf-2

我们可以在implimentation中访问Composite Component属性值(在接口部分中隐藏) #{cc.attrs.attributeName}

我们如何在后备组件中访问此值?

Bal*_*usC 7

它只在继承 getAttributes()方法的任何方法中可用,它返回一个Map<String, Object>属性名称为map键,属性值为map值.

Bar bar = (Bar) getAttributes().get("bar");
// ...
Run Code Online (Sandbox Code Playgroud)