Column toggle not working on <p:dataTable>
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
I didn't see this bug. Can you please attach a sample test.xhtml and TestBean.java for us to replicate? and What PF-version and browser are you using? Can you see styles of ColumnToggler Datatable?
Github Profile: https://github.com/mertsincan
There is still a bug. I have a very dynamic page. Once the dynamically added columns are added into the dataTable, the column toggler stops working. Example code:
<p:columnToggler datasource=":dataTableViewItems"
trigger="toggler"/>
<div style="clear:both"/> stops working.
<!--Custom Columns-->
<ui:include src="route_custom_field_column_layout.xhtml"></ui:include>
<!--Each of the Columns-->
<p:columns var="theCustomColumn"
priority="3"
value="#{jobViewBean.customColumns}"
columnIndexVar="theTblFieldColIndexVar"
colspan="#{jobViewBean.customColumns.size()}"
sortBy="#{viewItem.customFields[theCustomColumn.property].inputValue}"
width="140">
<!--Header-->
<f:facet name="header">
<h:outputText id="textHeader" value="#{theCustomColumn.header}" title="#{theCustomColumn.header}"/>
<p:tooltip trackMouse="true" for="textHeader" showEffect="clip" hideEffect="explode" />
</f:facet>
<!--Date-->
<p:outputLabel id="outLabelDate" rendered="#{viewItem.customFields[theCustomColumn.property].typeDateTimeDate}"
value="#{viewItem.customFields[theCustomColumn.property].inputValueDateOnlyString}"
title="#{viewItem.customFields[theCustomColumn.property].inputValueDateOnlyString}">
</p:outputLabel>
<p:tooltip rendered="#{viewItem.customFields[theCustomColumn.property].typeDateTimeDate}" trackMouse="true"
for="outLabelDate" showEffect="clip" hideEffect="explode" />
<!--Date and Time-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeDateTimeDateAndTime}"
value="#{viewItem.customFields[theCustomColumn.property].inputValueDateAndTimeString}"
title="#{viewItem.customFields[theCustomColumn.property].inputValueDateAndTimeString}"/>
<!--Decimal Plain-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeDecimalPlain}"
value="#{viewItem.customFields[theCustomColumn.property].inputValue}"
title="#{viewItem.customFields[theCustomColumn.property].inputValue}"/>
<!--Decimal Slider-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeDecimalSlider}"
value="#{viewItem.customFields[theCustomColumn.property].inputValue}"
title="#{viewItem.customFields[theCustomColumn.property].inputValue}"/>
<!--Decimal Spinner-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeDecimalSpinner}"
value="#{viewItem.customFields[theCustomColumn.property].inputValue}"
title="#{viewItem.customFields[theCustomColumn.property].inputValue}"/>
<!--Para HTML-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeParagraphTextHTML}"
value="#{viewItem.customFields[theCustomColumn.property].inputValue}"
escape="true"/>
<!--Para Plain-->
<p:outputLabel id="outputParaPlain"
rendered="#{viewItem.customFields[theCustomColumn.property].typeParagraphTextPlain}"
value="#{viewItem.customFields[theCustomColumn.property].inputValue}"
title="#{viewItem.customFields[theCustomColumn.property].inputValue}"/>
<p:tooltip rendered="#{viewItem.customFields[theCustomColumn.property].typeParagraphTextPlain}" trackMouse="true"
for="outputParaPlain" showEffect="clip" hideEffect="explode" />
<!--Table Field-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeTableField}"
value="Table Field"
title="Not Supported"/>
<!--Text Barcode-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeTextBarcode}"
value="Barcode Comes Here"/>
<!--Text Plain-->
<p:outputLabel id="outLabelTextPlain"
rendered="#{viewItem.customFields[theCustomColumn.property].typeTextPlain}"
value="#{viewItem.customFields[theCustomColumn.property].inputValue}"
title="#{viewItem.customFields[theCustomColumn.property].inputValue}"/>
<p:tooltip rendered="#{viewItem.customFields[theCustomColumn.property].typeTextPlain}" trackMouse="true"
for="outLabelTextPlain" showEffect="clip" hideEffect="explode" />
<!--Text Masked-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeTextMasked}"
value="#{viewItem.customFields[theCustomColumn.property].inputValue}"
title="#{viewItem.customFields[theCustomColumn.property].inputValue}"/>
<!--Multi Choice Single Select-->
<p:outputLabel id="outLabelMultiSingleSelect" rendered="#{viewItem.customFields[theCustomColumn.property].typeMultipleChoicePlain}"
value="#{viewItem.customFields[theCustomColumn.property].inputValueSingleSelectedValues}"
title="#{viewItem.customFields[theCustomColumn.property].inputValueSingleSelectedValues}"/>
<p:tooltip rendered="#{viewItem.customFields[theCustomColumn.property].typeMultipleChoicePlain}"
trackMouse="true" for="outLabelMultiSingleSelect" showEffect="clip" hideEffect="explode" />
<!--Multi Choice Many Select-->
<p:outputLabel id="outLabelMultiManySelect" rendered="#{viewItem.customFields[theCustomColumn.property].typeMultipleChoiceSelectMany}"
value="#{viewItem.customFields[theCustomColumn.property].inputValueSingleSelectedValues}"
title="#{viewItem.customFields[theCustomColumn.property].inputValueSingleSelectedValues}"/>
<p:tooltip rendered="#{viewItem.customFields[theCustomColumn.property].typeMultipleChoiceSelectMany}"
trackMouse="true" for="outLabelMultiManySelect" showEffect="clip" hideEffect="explode" />
</p:columns>
<p:columnToggler datasource=":dataTableViewItems"
trigger="toggler"/>
<div style="clear:both"/> stops working.
<!--Custom Columns-->
<ui:include src="route_custom_field_column_layout.xhtml"></ui:include>
<!--Each of the Columns-->
<p:columns var="theCustomColumn"
priority="3"
value="#{jobViewBean.customColumns}"
columnIndexVar="theTblFieldColIndexVar"
colspan="#{jobViewBean.customColumns.size()}"
sortBy="#{viewItem.customFields[theCustomColumn.property].inputValue}"
width="140">
<!--Header-->
<f:facet name="header">
<h:outputText id="textHeader" value="#{theCustomColumn.header}" title="#{theCustomColumn.header}"/>
<p:tooltip trackMouse="true" for="textHeader" showEffect="clip" hideEffect="explode" />
</f:facet>
<!--Date-->
<p:outputLabel id="outLabelDate" rendered="#{viewItem.customFields[theCustomColumn.property].typeDateTimeDate}"
value="#{viewItem.customFields[theCustomColumn.property].inputValueDateOnlyString}"
title="#{viewItem.customFields[theCustomColumn.property].inputValueDateOnlyString}">
</p:outputLabel>
<p:tooltip rendered="#{viewItem.customFields[theCustomColumn.property].typeDateTimeDate}" trackMouse="true"
for="outLabelDate" showEffect="clip" hideEffect="explode" />
<!--Date and Time-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeDateTimeDateAndTime}"
value="#{viewItem.customFields[theCustomColumn.property].inputValueDateAndTimeString}"
title="#{viewItem.customFields[theCustomColumn.property].inputValueDateAndTimeString}"/>
<!--Decimal Plain-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeDecimalPlain}"
value="#{viewItem.customFields[theCustomColumn.property].inputValue}"
title="#{viewItem.customFields[theCustomColumn.property].inputValue}"/>
<!--Decimal Slider-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeDecimalSlider}"
value="#{viewItem.customFields[theCustomColumn.property].inputValue}"
title="#{viewItem.customFields[theCustomColumn.property].inputValue}"/>
<!--Decimal Spinner-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeDecimalSpinner}"
value="#{viewItem.customFields[theCustomColumn.property].inputValue}"
title="#{viewItem.customFields[theCustomColumn.property].inputValue}"/>
<!--Para HTML-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeParagraphTextHTML}"
value="#{viewItem.customFields[theCustomColumn.property].inputValue}"
escape="true"/>
<!--Para Plain-->
<p:outputLabel id="outputParaPlain"
rendered="#{viewItem.customFields[theCustomColumn.property].typeParagraphTextPlain}"
value="#{viewItem.customFields[theCustomColumn.property].inputValue}"
title="#{viewItem.customFields[theCustomColumn.property].inputValue}"/>
<p:tooltip rendered="#{viewItem.customFields[theCustomColumn.property].typeParagraphTextPlain}" trackMouse="true"
for="outputParaPlain" showEffect="clip" hideEffect="explode" />
<!--Table Field-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeTableField}"
value="Table Field"
title="Not Supported"/>
<!--Text Barcode-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeTextBarcode}"
value="Barcode Comes Here"/>
<!--Text Plain-->
<p:outputLabel id="outLabelTextPlain"
rendered="#{viewItem.customFields[theCustomColumn.property].typeTextPlain}"
value="#{viewItem.customFields[theCustomColumn.property].inputValue}"
title="#{viewItem.customFields[theCustomColumn.property].inputValue}"/>
<p:tooltip rendered="#{viewItem.customFields[theCustomColumn.property].typeTextPlain}" trackMouse="true"
for="outLabelTextPlain" showEffect="clip" hideEffect="explode" />
<!--Text Masked-->
<p:outputLabel rendered="#{viewItem.customFields[theCustomColumn.property].typeTextMasked}"
value="#{viewItem.customFields[theCustomColumn.property].inputValue}"
title="#{viewItem.customFields[theCustomColumn.property].inputValue}"/>
<!--Multi Choice Single Select-->
<p:outputLabel id="outLabelMultiSingleSelect" rendered="#{viewItem.customFields[theCustomColumn.property].typeMultipleChoicePlain}"
value="#{viewItem.customFields[theCustomColumn.property].inputValueSingleSelectedValues}"
title="#{viewItem.customFields[theCustomColumn.property].inputValueSingleSelectedValues}"/>
<p:tooltip rendered="#{viewItem.customFields[theCustomColumn.property].typeMultipleChoicePlain}"
trackMouse="true" for="outLabelMultiSingleSelect" showEffect="clip" hideEffect="explode" />
<!--Multi Choice Many Select-->
<p:outputLabel id="outLabelMultiManySelect" rendered="#{viewItem.customFields[theCustomColumn.property].typeMultipleChoiceSelectMany}"
value="#{viewItem.customFields[theCustomColumn.property].inputValueSingleSelectedValues}"
title="#{viewItem.customFields[theCustomColumn.property].inputValueSingleSelectedValues}"/>
<p:tooltip rendered="#{viewItem.customFields[theCustomColumn.property].typeMultipleChoiceSelectMany}"
trackMouse="true" for="outLabelMultiManySelect" showEffect="clip" hideEffect="explode" />
</p:columns>
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Do you see this bug without Rio Layout and Theme? I think this isn't a theme issue. Please use the core forum.
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest