Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.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-xhtml在<;p:输出面板>;每次ajax调用都需要刷新_Ajax_Jsf_Jsf 2_Primefaces - Fatal编程技术网

JSF-xhtml在<;p:输出面板>;每次ajax调用都需要刷新

JSF-xhtml在<;p:输出面板>;每次ajax调用都需要刷新,ajax,jsf,jsf-2,primefaces,Ajax,Jsf,Jsf 2,Primefaces,这是我正在使用的代码 <p:layoutUnit position="west" size="310" header="Filter Criteria" resizable="true" collapsible="true" gutter="1" effect="drop"><p:outputPanel id="sysdetfilterDisplay"><ui:include src="/faces/systemdetailsfilter.xhtml"> &l

这是我正在使用的代码

<p:layoutUnit position="west" size="310" header="Filter Criteria"
resizable="true" collapsible="true" gutter="1" effect="drop"><p:outputPanel id="sysdetfilterDisplay"><ui:include src="/faces/systemdetailsfilter.xhtml">
</p:outputPanel></p:layoutUnit><p:layoutUnit position="center">
<p:outputPanel id="contentDisplay"><ui:include src="/faces/systemdetailsinfo.xhtml" ><ui:include src="/faces/comment.xhtml">
<p:outputPanel>

在systemdetailsfilter.xhtml中,我有一个datatable,当我单击数据表中的每一行时,每一行对应的数据显示在另一个xhtml中,即systemdetailsinfo.xhtml,位于另一个布局单元的另一个输出面板中,如上所述。
实际收益:
我的问题是systemdetailsinfo.xhtml中有一个edit按钮,它用于编辑数据,这将显示数据表中所选特定行的数据,正如我前面所说的。 当我搜索并单击datatable中的另一行时,id=“contentDisplay”仍将显示已编辑的字段[因为我已为先前选择的上一行单击了编辑按钮,而没有为当前显示数据的行单击编辑按钮]当我单击datatable中的每一行时,右侧的页面不会刷新。 下面是我在datatable中添加的ajax调用。



明确的责任:

每次单击datatable中的不同行时,systemdetailsinfo.xhtml都应该刷新。

那么-它不工作了吗?或者你想让代码看起来更好?问题是什么?内容显示在outputpanel内的systemdetailsinfo.xhtml中。但当我单击显示内容的编辑按钮时,编辑的字段仍保持编辑状态,尽管我单击了datatable中的另一行[但新数据以编辑模式显示,并且假设显示为不可编辑]。假设刷新。或者如何刷新systemdetailsinfo.xhtml考虑到上面单击DataTable中每一行的代码,根据您使用的primefaces版本,您可以在outputPanel中定义autoUpdate=“true”。
<p:ajax event="rowSelect" listener="#{systemDetailsBean.onRowSelect}"  
update=":contentDisplay :growl :error">