You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by jo...@basf-it-services.com on 2007/05/31 10:16:27 UTC

Possible bug in the columns tag with the convertDateTime tag

The timeZone and pattern values are not being read from the columnInfo
object when the tag is within a columns tag in a dataTable.
<f:convertDateTime timeZone="#{columnInfo.timeZone}"
pattern="#{columnInfo.pattern}" />

The columnInfo is set by the columns tag but the getter is not called.
However, if we access the values via an outputText tag e.g.
<h:outputText value="#{columnInfo.timeZone}" /> (These values will be
displayed)
<h:outputText value="#{columnInfo.pattern}" /> (These values will be
displayed)

the getters are accessed and the values displayed.

Here is a sample of the code.

<t:dataTable id="edbcd" styleClass="standardTable"
headerClass="standardTableHeader" footerClass="standardText"
      rowClasses="standardTable_Row1, standardTable_Row2" var="data"
preserveDataModel="false"
value="#{masterDataController.sortableList.dataModel}" rows="10"
      sortColumn="#{masterDataController.sortableList.sort}"
sortAscending="#{masterDataController.sortableList.ascending}"
preserveSort="false"
      renderedIfEmpty="false">

<t:columns var="columnInfo"
value="#{masterDataController.sortableList.columnInfos}"
styleClass="#{masterDataController.sortableList.columnStyleClass}">
<f:facet name="header">
      <t:commandSortHeader columnName="#{columnInfo.columnName}"
arrow="true" styleClass="tableHeader" immediate="false"
            action="#{masterDataController.sortableList.sort}">
            <h:outputText value="#{columnInfo.columnHeader}" />
      </t:commandSortHeader>
</f:facet>
      <t:outputText
value="#{masterDataController.sortableList.columnValue}"
rendered="#{!masterDataController.sortableList.dataModel.selected}" />
            size="#{columnInfo.inputWidth}"
maxlength="#{columnInfo.inputMaxLength}">
       <f:convertDateTime timeZone="#{columnInfo.timeZone}"
pattern="#{columnInfo.pattern}" />
<t/:outputText>
<h:outputText value="#{columnInfo.timeZone}" /> (These values will be
displayed)
<h:outputText value="#{columnInfo.pattern}" /> (These values will be
displayed)
</t:columns>


Mit freundlichen Grüßen
Jonathan Sutherland