Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ajax/6.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

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 ajax ViewScope重新加载整个页面_Ajax_Jsf_Prerender - Fatal编程技术网

jsf ajax ViewScope重新加载整个页面

jsf ajax ViewScope重新加载整个页面,ajax,jsf,prerender,Ajax,Jsf,Prerender,当我使用以下命令执行ajax调用时: <h:form id="showEntriesForm"> <h:commandButton value="Einträge anzeigen" onclick="javascript:this.disabled=true;" id="showEntryb"> <f:ajax event="click" execute="@form" render=":main :showEntriesButton" liste

当我使用以下命令执行ajax调用时:

<h:form id="showEntriesForm">
    <h:commandButton value="Einträge anzeigen" onclick="javascript:this.disabled=true;" id="showEntryb">
    <f:ajax event="click" execute="@form" render=":main :showEntriesButton" listener="#{bean.showEntries}"/>
    </h:commandButton> 
</h:form>

它再次执行所有@prerender命令,似乎重新加载了整个页面。 我以为ajax会重新加载我让它重新加载的部分

还是始终执行预渲染?在创建视图时,我是否需要prerender以外的其他东西来只获取一次GET变量


在呈现给定视图之前,将触发ADVICES

@Prerender
事件,这意味着即使只需要更新属于视图的某些组件,也应调用带注释的方法


不确定你的方法做什么,但也许你应该试试
@Init
注释。

嗨,我的方法正在执行sql请求,以便将Init数据加载到bean中。那么@Init会解决这个问题吗?我的预渲染看起来是这样的:我没有@Init注释?你没有?请为您的
@Prerender
批注发布导入