myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cooper, Stephen" <Stephen.Coo...@McKesson.com>
Subject RE: A sorting problems using t:dataTable and <f:facet name="detailStamp">.
Date Fri, 09 Feb 2007 19:43:39 GMT
You need to specify 

rowId="#{ pcbLab.someUniqueIdentifier}"

 

That should address the issue you're seeing.

Coop

  _____  

From: Iakouchev Alexander-EAL027C [mailto:EAL027C@motorola.com] 
Sent: Friday, February 09, 2007 12:33 PM
To: users@myfaces.apache.org
Subject: A sorting problems using t:dataTable and <f:facet
name="detailStamp">.

 

I experienced a sorting problems using t:dataTable and <f:facet
name="detailStamp">.

 

I am using dataTable component as Master/Details. Everything is working
fine, but I got problem with sorting table columns.

I need to show details information for every row. Plus/mines icon allows
show/hide additional information in <f:facet name="detailStamp"> panel.
Column header link (<f:facet name="header">) sort  beans in
ascending/descending order.

 

Sorting works well, but expanded row still in same position after
sorting.

For example:

Step 1: Expanded row number 3 (bean id value=3).

Step 2: Sorted column ...

Step 3: Expanded row number 3 (bean id value=585).

 

It seams dataTable (f:facet name="detailStamp) component do not care
about bean assigned to expanded row.

 

I tried explicitly specify bean in variable
varDetailToggler="detailToggler", changing to varDetailToggler="<%=
pcbLab %>" (var="pcbLab" - bean name) and specify
"currentDetailExpanded" setter/getter method and "toggleDetail" action
for "pcbLab" bean. But it did not help.

 

Is anybody experienced problem like this?

Any help appreciated.

 

Alex Yakushev.

 

Below, how looks my jsp page.

 

 

 

 

            <t:dataTable id="rprcPCBLabsTable"

              value="#{mtRPRCListPCBLabs.pcbLabDataModel}"

              rowClasses="standardTable_Row1,standardTable_Row2"

 
columnClasses="standardTable_Column,standardTable_ColumnCentered,standar
dTable_Column"

              sortColumn="#{mtRPRCListPCBLabs.sort}"

              sortAscending="#{mtRPRCListPCBLabs.ascending}"

      sortable="true"

              rows="#{mtRPRCSearchBean.returnTop}"

              var="pcbLab"

              width="100%"

              varDetailToggler="detailToggler"

              cellpadding="1" cellspacing="1"

              preserveDataModel="true"

              preserveSort="true"

              rowIndexVar="rowIndex"

            >

                        <t:column>

                          <f:facet name="header">

                                    <t:outputText value="" style="width:
100%" styleClass="rprcStandardTable_Header"/>

                          </f:facet>

                          <t:commandLink
rendered="#{!detailToggler.currentDetailExpanded}"
action="#{detailToggler.toggleDetail}">

                                    <t:graphicImage
value="/images/closed.gif" border="0"/>

                          </t:commandLink>

                          <t:commandLink
rendered="#{detailToggler.currentDetailExpanded}"
action="#{detailToggler.toggleDetail}">

                                    <t:graphicImage
value="/images/open.gif" border="0"/>

                          </t:commandLink>

                        </t:column>

                        <t:column>

                          <f:facet name="header">

                                    <t:commandSortHeader
columnName="Req" arrow="true" style="width: 100%"
styleClass="rprcStandardTable_Header">

                                      <t:outputText value="Req"/>

                                    </t:commandSortHeader>

                          </f:facet>

                          <t:outputText
value="#{pcbLab.pcbLab_Order_ID}"/>

                        </t:column>

 

                        <f:facet name="detailStamp">

                          <t:panelGroup>

                                    <t:panelGrid columns="8"
cellpadding="0" cellspacing="0">

                                      <t:outputText
value="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" escape="false"/>

                                      <t:commandSortHeader
columnName="StartTime" arrow="true" style="width: 100%"
styleClass="rprcStandardTable_Header_Dark">

                                                <t:outputText
value="Start Time"/>

                                      </t:commandSortHeader>

                                      <t:commandSortHeader
columnName="FinishTime" arrow="true" style="width: 100%"
styleClass="rprcStandardTable_Header_Dark">

                                                <t:outputText
value="Finish Time"/>

                                      </t:commandSortHeader>

                                      <t:commandSortHeader
columnName="CycleTime" arrow="true" style="width: 100%"
styleClass="rprcStandardTable_Header_Dark">

                                                <t:outputText
value="Cycle Time"/>

                                      </t:commandSortHeader>

                                      <t:commandSortHeader
columnName="GoodBoards" arrow="true" style="width: 100%"
styleClass="rprcStandardTable_Header_Dark">

                                                <t:outputText
value="Good Boards"/>

                                      </t:commandSortHeader>

                                      <t:commandSortHeader
columnName="BadBoards" arrow="true" style="width: 100%"
styleClass="rprcStandardTable_Header_Dark">

                                                <t:outputText value="Bad
Boards"/>

                                      </t:commandSortHeader>

                                      <t:commandSortHeader
columnName="DefectType" arrow="true" style="width: 100%"
styleClass="rprcStandardTable_Header_Dark">

                                                <t:outputText
value="Defect Type"/>

                                      </t:commandSortHeader>

                                      <t:commandSortHeader
columnName="SubmitTime" arrow="true" style="width: 100%"
styleClass="rprcStandardTable_Header_Dark">

                                                <t:outputText
value="Submit Time"/>

                                      </t:commandSortHeader>

 

                                      <t:outputText value=""/>

                                      <t:outputText
styleClass="rprcStandardTable_Row" style="width: 100"

 
value="#{pcbLab.start_date_time}"

                                      >

                                                <f:convertDateTime
pattern="MM/dd/yyyy"/>

                                      </t:outputText>

                                      <t:outputText
styleClass="rprcStandardTable_Row" style="width: 100"

 
value="#{pcbLab.finish_date_time}"

                                      >

                                                <f:convertDateTime
pattern="MM/dd/yyyy"/>

                                      </t:outputText>

                                      <t:outputText
styleClass="rprcStandardTable_Row" style="width: 100"
value="#{pcbLab.tmpCycleTime}"/>

                                      <t:outputText
styleClass="rprcStandardTable_Row" style="width: 100"
value="#{pcbLab.good_boards}"/>

                                      <t:outputText
styleClass="rprcStandardTable_Row" style="width: 100"
value="#{pcbLab.bad_boards}"/>

                                      <t:outputText
styleClass="rprcStandardTable_Row" style="width: 100"
value="#{pcbLab.defect_type}"/>

                                      <t:outputText
styleClass="rprcStandardTable_Row" style="width: 100"

 
value="#{pcbLab.start_date_time}"

                                      >

                                                <f:convertDateTime
pattern="MM/dd/yyyy"/>

                                      </t:outputText>

                                    </t:panelGrid>

                          </t:panelGroup>

                        </f:facet>

            </t:dataTable>

            <t:dataScroller

              id="jobsPCBLabsDataScroller"

              for="rprcPCBLabsTable"

              fastStep="10"

              styleClass="scroller"

              paginator="true"

              paginatorMaxPages="9"

              paginatorTableClass="paginator"

              paginatorActiveColumnStyle="font-weight:bold;"

              rowsCountVar="rowsCount"

              displayedRowsCountVar="displayedRowsCountVar"

              firstRowIndexVar="firstRowIndex"

              lastRowIndexVar="lastRowIndex"

              pageCountVar="pageCount"

              pageIndexVar="pageIndex"

            >

              <f:facet name="first">

                        <t:graphicImage url="/images/arrow-first.gif"
border="0"/>

              </f:facet>

              <f:facet name="last">

                        <t:graphicImage url="/images/arrow-last.gif"
border="0"/>

              </f:facet>

              <f:facet name="previous">

                        <t:graphicImage url="/images/arrow-previous.gif"
border="0"/>

              </f:facet>

              <f:facet name="next">

                        <t:graphicImage url="/images/arrow-next.gif"
border="0"/>

              </f:facet>

              <f:facet name="fastforward">

                        <t:graphicImage url="/images/arrow-ff.gif"
border="0"/>

              </f:facet>

              <f:facet name="fastrewind">

                        <t:graphicImage url="/images/arrow-fr.gif"
border="0"/>

              </f:facet>

 

            </t:dataScroller>

 

 


Mime
View raw message