Я создал <p:dialog>
со встроенным <p:carousel>
с tabs
, и на одной из вкладок у меня есть <p:datatable>
, но я замечаю, что такие действия, как Pagination
, Filtering
и Sorting
не работают в моем datatable, когда datatable находится внутри компонента carousel
(я попытался удалить карусель, и действия работают отлично). Известны ли какие-либо проблемы совместимости компонентов carousel
и datatable
? Я делаю что-то неправильно?
.x html код
<p:dialog header="View information"
widgetVar="dialog" id="dialog"
position="center" modal="true" height="300" width="400"
appendTo="@(body)">
<p:carousel id="carousel" widgetVar="carousel" circular="true" numVisible="1" itemStyle="width:500px;height:400px;" pageLinks="1">
<p:tab>
<h:form prependId="false">
<p:dataTable id="carousel_results" var="obj"
value="#{myBean.myModel.myObjects}"
widgetVar="carouselTable"
rowKey="#{obj.value}"
paginator="true" rows="10"
filteredValue="#{myBean.filteredObjects}"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="5,10,15,20,25,30,35,40,50,100,{ShowAll|'Show All'" paginatorPosition="bottom">
<f:facet name="header">
Information
</f:facet>
<p:column headerText="Value" filterBy="#{obj.value}"
filterValue="#{obj.value}"
filterMatchMode="contains"
sortBy="#{obj.value}">
<h:outputText value="{obj.value}"/>
</p:column>
........
</p:dataTable>
</h:form>
</p:tab>
</p:carousel>
</p:dialog>
MyBean
@ManagedBean
@ViewScoped
public class MyBean implements Serializable {
private Model myModel
private List<CustomObject> filteredObjects // list to store filtered objects
Модель
public class Model{
private List<CustomObject> myObjects
}
Я использую Primefaces версии 7.0.