我有一个PrimeFaces dataTable,我想让它的标题可滚动。我要将图像嵌入标题中,因此当内容向下滚动时,图像应该消失。代码看起来像;
<p:dataTable id="dataTable" liveScroll="true"
value="#{....}" var="...." scrollable="true"
scrollRows="3"
scrollHeight="490" rows="3">
<f:facet name="header">
<p:graphicImage value="/images/..."></p:graphicImage>
</f:facet>
<p:column ........
答案 0 :(得分:0)
你可以将它放入一个scrollPanel
<p:scrollPanel>
<p:dataTable id="dataTable" liveScroll="true"
value="#{....}" var="...." scrollable="true"
scrollRows="3"
scrollHeight="490" rows="3">
<f:facet name="header">
<p:graphicImage value="/images/..."></p:graphicImage>
</f:facet>
...
</p:scrollPanel>