Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/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 Primefaces:Datatable LiveScroll中的PanelGrid_Jsf_Jsf 2_Primefaces - Fatal编程技术网

Jsf Primefaces:Datatable LiveScroll中的PanelGrid

Jsf Primefaces:Datatable LiveScroll中的PanelGrid,jsf,jsf-2,primefaces,Jsf,Jsf 2,Primefaces,有人试过吗?当它加载更多的panelGrid时,表只是复制它们。 . 上侧显示了应该如何以正确的方式渲染,但它会像下侧一样出错 <p:dataTable liveScroll="true" value="#{PanelController.panelList2}" var="GridPanel" scrollable="true" scrollRows="20" scrollHeight="100" rows="5"> <p:co

有人试过吗?当它加载更多的panelGrid时,表只是复制它们。 . 上侧显示了应该如何以正确的方式渲染,但它会像下侧一样出错

         <p:dataTable liveScroll="true" value="#{PanelController.panelList2}" var="GridPanel" scrollable="true" scrollRows="20" scrollHeight="100" rows="5">
               <p:column>
                   <p:panelGrid>
                       <p:row>
                           <p:column>
                               <h:outputText value="ehehe"></h:outputText>
                           </p:column>
                       </p:row>
                   </p:panelGrid>
               </p:column>
       </p:dataTable>


如果由我决定,我会使用p:dataScroller,然后使用其中的panelgrid。看看这个:

你能用一个工作示例扩展你的问题并添加更多的描述吗,比如,到目前为止你尝试了什么?我编辑了我的问题以获取更多细节。你为什么要在
中使用
?您对此的功能要求是什么,或者您只是想在datatable中的项中添加一些好看的内容?请注意,生成的HTML将是表中的一个表,对于您试图构思的怪物,有更好的解决方案。实际上,我正在尝试将好看的项目插入dataTable(我需要组成行、列等)我如何才能不使用panelGrid而做到这一点?最好定义您是否需要使用
来满足您的功能需求。主要区别(在视图中)是
不会将所有内容包装在一个表中,您可以自由地在其中编写所需的HTML/JSF代码。