Primefaces ConfirmBehavior dosen';不支持Ajax渲染

Primefaces ConfirmBehavior dosen';不支持Ajax渲染,primefaces,Primefaces,使用ConfirmBehavior对按钮进行Ajax更新后,所有确认对话框属性(标题、消息、图标)都将变为空 其看起来像这些值仅在buildView阶段进行评估(applyMetadata函数) 在ConfirmBehavior的getHeader()/getMessage()/getIcon()方法中,没有表达式的求值 如何在这一点上得到真正的表达式?(在渲染阶段对其进行评估)不是完美的解决方案 public class ConfirmBehavior extends ClientBehavi

使用
ConfirmBehavior
对按钮进行Ajax更新后,所有确认对话框属性(标题、消息、图标)都将变为空

其看起来像这些值仅在buildView阶段进行评估(applyMetadata函数)

在ConfirmBehavior的
getHeader()
/
getMessage()
/
getIcon()
方法中,没有表达式的求值

如何在这一点上得到真正的表达式?(在渲染阶段对其进行评估)

不是完美的解决方案

public class ConfirmBehavior extends ClientBehaviorBase {

    private String header;
    private String message;
    private String icon;

    @Override
    public String getScript(ClientBehaviorContext behaviorContext) {
        FacesContext context = behaviorContext.getFacesContext();
        UIComponent component = behaviorContext.getComponent();
        String source = component.getClientId(context);

        if(component instanceof Confirmable) {          
            String headerExpr = (String) component.getAttributes().get("confirm_header");
            if (headerExpr!=null)
                this.header = (String) ContextUtil.eval(context, headerExpr);
            String messageExpr = (String) component.getAttributes().get("confirm_message");         
            if (messageExpr!=null)
                this.message = (String) ContextUtil.eval(context, messageExpr);
            String iconExpr = (String) component.getAttributes().get("confirm_icon");           
            if (iconExpr!=null)
                this.icon = (String) ContextUtil.eval(context, iconExpr);
            String script = "PrimeFaces.confirm({source:'" + source + "',header:'" + getHeader() + "',message:'" + getMessage() + "',icon:'" + getIcon()  + "'});return false;";
            ((Confirmable) component).setConfirmationScript(script);

            return null;
        }
        else {
            throw new FacesException("Component " + source + " is not a Confirmable. ConfirmBehavior can only be attached to components that implement org.primefaces.component.api.Confirmable interface");
        }

    }
...
}