我需要根据调用页面的位置更新不同的组件。
<p:commandButton id="questionnaire_save_button"
value="#{shop_msgs['questionnaire.save.button.label']}"
action="#{questionnaireBean.update(questionnaire)}"
update=":#{p:component(#{questionnaireBean.refreshComponentId})}" />
在我的问卷豆中,我有以下方法:
public String getRefreshComponentId() {
refreshComponentId = "";
if(isFromCCRM()) {
refreshComponentId ="questionnaires_wrapper_panel";
}else {
refreshComponentId = "breadcrumbs_panel";
}
return refreshComponentId;
}
但是我不断收到语法错误:原因:javax.el.ELException: Error Parsing: :#{p:component(#{questionnaireBean.refreshComponentId})} at org.jboss.el.lang.ExpressionBuilder.createNodeInternal(ExpressionBuilder.java :130) at org.jboss.el.lang.ExpressionBuilder.createValueExpression(ExpressionBuilder.java:195) at org.jboss.el.ExpressionBuilder.build(ExpressionBuilder.java:151)。 createValueExpression(ExpressionFactoryImpl.java:68) at com.sun.faces.facelets.tag.TagAttributeImpl.getValueExpression(TagAttributeImpl.java:385) ... 117 更多原因:org.jboss.el.parser.ParseException:遇到“{ ”在第 1 行第 17 列。期待以下之一:“。” ...“)”...“[”...“,...>”...“gt” ... "<" ... "lt" ... >=" ... "ge" ... "<=" ... "le" ... "==" ... "eq " ... "!=" ... "ne" ... "&&" ... "和" ... "||" ...“或”...“*”...“+”...“-”...“?” ... "/" ... "div" ... "%" ... "mod" ... "(" .. ...“或”...“*”...“+”...“-”...“?” ... "/" ... "div" ... "%" ... "mod" ... "(" .. ...“或”...“*”...“+”...“-”...“?” ... "/" ... "div" ... "%" ... "mod" ... "(" ..