如何将参数传递给Ajax更新表达式

时间:2017-09-27 12:59:48

标签: primefaces el

如果不是"processContext.targetUpdate",我想将'update'中的值从托管bean传递到commandButton中的null标记。

所以我做了:

<p:commandButton
                                update="@(.painelInfoDer) 
                                @(.msgsDialogAltDer) 
                                @(.opValorAtualDer) 
                                @(.outputPanel) 
                                @(.#{processContext.targetUpdate != null?processContext.targetUpdate:@none})"

但我收到了一个错误:

Caused by: com.sun.el.parser.ParseException: Encountered "@" at line 1, column 157.
Was expecting one of:
    <INTEGER_LITERAL> ...
    <FLOATING_POINT_LITERAL> ...
    <STRING_LITERAL> ...
    "true" ...
    "false" ...
    "null" ...
    "(" ...
    "!" ...
    "not" ...
    "empty" ...
    "-" ...
    <IDENTIFIER> ...

这个表达有什么问题?会像我期望的那样传递像这样的参数吗?

我认为问题是@none,现在我改为:

<p:commandButton
                                update="@(.painelInfoDer) 
                                @(.msgsDialogAltDer) 
                                @(.opValorAtualDer) 
                                @(.outputPanel) 
                                @(.#{processContext.targetUpdate != null?processContext.targetUpdate:''})"

现在按钮消失了。

0 个答案:

没有答案