Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 以编程方式重写复合组件属性的值表达式_Java_Jsf 2_Jsf 2.2_Composite Component_Mojarra - Fatal编程技术网

Java 以编程方式重写复合组件属性的值表达式

Java 以编程方式重写复合组件属性的值表达式,java,jsf-2,jsf-2.2,composite-component,mojarra,Java,Jsf 2,Jsf 2.2,Composite Component,Mojarra,我已经编写了一个包装器组件,它在某些情况下覆盖其子组件的某些属性 在事件后的INVOKE_应用程序阶段,它在子组件上调用UIComponentsetValueExpression: FacesContext ctx = FacesContext.getCurrentInstance(); ELContext eLContext = ctx.getELContext(); ExpressionFactory factory = ctx.getApplication().getExpressionF

我已经编写了一个包装器组件,它在某些情况下覆盖其子组件的某些属性

在事件后的INVOKE_应用程序阶段,它在子组件上调用UIComponentsetValueExpression:

FacesContext ctx = FacesContext.getCurrentInstance();
ELContext eLContext = ctx.getELContext();
ExpressionFactory factory = ctx.getApplication().getExpressionFactory();
String newModelExpression = "#{newExpression}";
ValueExpression exp = factory.createValueExpression(eLContext, newModelExpression, Object.class);
((UIComponent) child).setValueExpression("model", exp);  
除了作为子组件的复合组件外,一切都很好

使用复合组件时,值表达式将在RENDER_响应阶段重置,并计算初始表达式

这发生在CompositeComponentTagHandler$CompositeComponentRule$CompositeExpressionMetadataapplyMetaData中

有解决办法吗

我将Payara与jsf impl Mojarra 2.2.12一起使用,只是将UIComponentsetValueExpression进一步称为预渲染视图事件处理