You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "K. Johnson" <in...@streetcookie.com> on 2006/10/31 17:13:27 UTC
dataScroller and sortHeader (sorry forgot to add sortHeader example)
Sorry,
i submitted the first response without adding the sortableHeader code.
> Add the datatTable with an Id:
>
> <t:dataTable id="myDataTable" cellspacing="0" preserveSort="false" sortColumn="#{myBean.sort}" sortAscending="#{myBean.ascending}" value="#{myBean.myValues}" rows="10" var="myValue" rowIndexVar="index" style="border: none;">
<t:column>
<f:facet name="header">
<t:commandSortHeader id="myMethod" columnName="myColumn" immediate="false">
#{myBean.theSortableHeaderValue}
</t:commandSortHeader>
</f:facet>
#{mybean.value}
</t:column>
</t:dataTable>
>
> Then add the dataScroller with a "for" attribute pointed to the dataTable.
>
> <t:dataScroller id="pager" for="myDataTable" pageCountVar="pageCount" pageIndexVar="pageIndex" rowsCountVar="rowsCount" first="#{pageIndex}" firstRowIndexVar="pageIndex" displayedRowsCountVar="displayedRowsCount"
> fastStep="5" paginator="true" renderFacetsIfSinglePage="false" paginatorMaxPages="5" paginatorActiveColumnStyle="font-size:12px; font-decoration:bold;" styleClass="scroller">
> <f:facet name="previous">Previous</f:facet>
> <f:facet name="next">Next</f:facet>
> <f:param value="#{rowsCount}/" />
> <f:param value="#{displayedRowsCount}" />
> <f:param value="#{lastRowIndex}" />
> <f:param value="#{pageIndex}" />
> <f:param value="#{pageCount}" />
> </t:dataScroller>
>
>
>
>
>
> > -------Original Message-------
> > From: clockdva <to...@katamail.com>
> > Subject: a dataScroller and a SortHeader in the same dataTable
> > Sent: 31 Oct '06 13:39
> >
> >
> > http://myfaces.apache.org/tomahawk/dataScroller.html
> > http://myfaces.apache.org/tomahawk/extDataTable.html
> >
> > It is possible to use a dataScroller and a SortHeader in the same
> > dataTable??
> > How can i do??
> >
> >
> > thanks
> >
> > --
> > View this message in context: http://www.nabble.com/a--dataScroller-and-a-SortHeader-in-the-same-dataTable-tf2545861.html#a7094023
> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >
> >
>
Re: dataScroller and sortHeader (sorry forgot to add sortHeader
example)
Posted by clockdva <to...@katamail.com>.
i have tried this and it seems to work
<f:view>
<h:form>
<t:dataTable id="booksDataTable"
rowClasses="standardTable_Row1,standardTable_Row2"
columnClasses="standardTable_Column,standardTable_ColumnCentered,standardTable_Column"
var="bookTemp"
value="#{books}"
preserveDataModel="false"
rows="4"
sortColumn="#{bookSearching.sort}"
sortAscending="#{bookSearching.ascending}"
preserveSort="true">
<t:column defaultSorted="true" sortable="true">
<f:facet name="header">
<t:commandSortHeader columnName="title" arrow="true"
propertyName="title">
<h:outputText value="Title"/>
</t:commandSortHeader>
</f:facet>
<h:outputText value="#{bookTemp.title}" />
</t:column>
<t:column defaultSorted="true" sortable="true">
<f:facet name="header">
<t:commandSortHeader columnName="nome" arrow="true"
propertyName="nome">
<h:outputText value="Nome"/>
</t:commandSortHeader>
</f:facet>
<h:outputText value="#{bookTemp.nome}" />
</t:column>
</t:dataTable>
<h:panelGrid columns="1" columnClasses="standardTable_ColumnCentered" >
<t:dataScroller id="scroll_1"
for="booksDataTable"
fastStep="10"
pageCountVar="pageCount"
pageIndexVar="pageIndex"
styleClass="scroller"
paginator="true"
paginatorMaxPages="9"
paginatorTableClass="paginator"
paginatorActiveColumnStyle="font-weight:bold;"
immediate="false">
<f:facet name="first" >
<t:graphicImage url="images/first.gif" border="1"
/>
</f:facet>
<f:facet name="last">
<t:graphicImage url="images/last.gif" border="1" />
</f:facet>
<f:facet name="previous">
<t:graphicImage url="images/back.gif" border="1" />
</f:facet>
<f:facet name="next">
<t:graphicImage url="images/next.gif" border="1" />
</f:facet>
</t:dataScroller>
</h:panelGrid>
</h:form>
</f:view>
is it a good solution??
thanks
--
View this message in context: http://www.nabble.com/dataScroller-and-sortHeader-%28sorry-forgot-to-add-sortHeader-example%29-tf2546685.html#a7098204
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: dataScroller and sortHeader (sorry forgot to add sortHeader
example)
Posted by clockdva <to...@katamail.com>.
StreetCookie CD Duplication wrote:
>
>
> Sorry,
>
> i submitted the first response without adding the sortableHeader code.
>
>> Add the datatTable with an Id:
>>
>> <t:dataTable id="myDataTable" cellspacing="0"
>> preserveSort="false" sortColumn="#{myBean.sort}"
>> sortAscending="#{myBean.ascending}" value="#{myBean.myValues}" rows="10"
>> var="myValue" rowIndexVar="index" style="border: none;">
>
> <t:column>
> <f:facet name="header">
> <t:commandSortHeader id="myMethod"
> columnName="myColumn" immediate="false">
> #{myBean.theSortableHeaderValue}
> </t:commandSortHeader>
> </f:facet>
> #{mybean.value}
> </t:column>
>
>
>
> </t:dataTable>
>>
>> Then add the dataScroller with a "for" attribute pointed to the
>> dataTable.
>>
>> <t:dataScroller id="pager" for="myDataTable"
>> pageCountVar="pageCount" pageIndexVar="pageIndex"
>> rowsCountVar="rowsCount" first="#{pageIndex}"
>> firstRowIndexVar="pageIndex" displayedRowsCountVar="displayedRowsCount"
>> fastStep="5" paginator="true"
>> renderFacetsIfSinglePage="false" paginatorMaxPages="5"
>> paginatorActiveColumnStyle="font-size:12px; font-decoration:bold;"
>> styleClass="scroller">
>> <f:facet name="previous">Previous</f:facet>
>> <f:facet name="next">Next</f:facet>
>> <f:param value="#{rowsCount}/" />
>> <f:param value="#{displayedRowsCount}" />
>> <f:param value="#{lastRowIndex}" />
>> <f:param value="#{pageIndex}" />
>> <f:param value="#{pageCount}" />
>> </t:dataScroller>
>>
>>
>>
>>
>>
>> > -------Original Message-------
>> > From: clockdva <to...@katamail.com>
>> > Subject: a dataScroller and a SortHeader in the same dataTable
>> > Sent: 31 Oct '06 13:39
>> >
>> >
>> > http://myfaces.apache.org/tomahawk/dataScroller.html
>> > http://myfaces.apache.org/tomahawk/extDataTable.html
>> >
>> > It is possible to use a dataScroller and a SortHeader in the same
>> > dataTable??
>> > How can i do??
>> >
>> >
>> > thanks
>> >
>> > --
>> > View this message in context:
>> http://www.nabble.com/a--dataScroller-and-a-SortHeader-in-the-same-dataTable-tf2545861.html#a7094023
>> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >
>> >
>>
>
>
i'll try
thanks
--
View this message in context: http://www.nabble.com/dataScroller-and-sortHeader-%28sorry-forgot-to-add-sortHeader-example%29-tf2546685.html#a7098062
Sent from the MyFaces - Users mailing list archive at Nabble.com.