Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.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
Jsf 如何在f:actionlistener事件后刷新页面_Jsf_Actionlistener - Fatal编程技术网

Jsf 如何在f:actionlistener事件后刷新页面

Jsf 如何在f:actionlistener事件后刷新页面,jsf,actionlistener,Jsf,Actionlistener,使用JSF时,我有一个标记,它有一个确认按钮。单击时会触发actionListenerEvent。页面和faces上下文中的对象都被更新了,但是我有一个引导手风琴没有更新。一个解决方案是刷新页面,这是我的问题 <ux:confirm ok="#{message.get('Label.Sim')}" ajax="true" render="form-consulta" cancel="#{message.get('Label.Nao')}" title

使用JSF时,我有一个
标记,它有一个确认按钮。单击时会触发actionListenerEvent。页面和faces上下文中的对象都被更新了,但是我有一个引导手风琴没有更新。一个解决方案是刷新页面,这是我的问题

<ux:confirm
    ok="#{message.get('Label.Sim')}"
    ajax="true"
    render="form-consulta"
    cancel="#{message.get('Label.Nao')}"
    title="#{message.get('Label.Excluir')}"
    message="#{message.get('Msg.DesejaExcluirRegistro')}"
    >

    <f:actionListener 
      for="onOkClick" 
      binding="#{bean.excluir()}" 
       />
</ux:confirm>

好的,只需在ajax事件上添加一个JavaScript函数,并使用JavaScript调用一个模板方法即可解决

函数OneEventConfig(数据){
App.ajax.onEvent(App.view.block,null,null,App.view.unblock);
var状态=data.status;
开关(状态){
案例“完成”:
如果(确认后应刷新)
this.location.reload();
打破
}
}