myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Müllan" <bierbra...@gmail.com>
Subject Re: Question about TOMAHAWK datatable example
Date Sun, 29 Oct 2006 13:24:55 GMT
Hi,

the column name corresponds to the embedded outputText in a header
facet in a dataTable
component. So, if you have something like:

<f:facet name="header">
         <h:outputText value="#{text['activeUsers.fullName']}" />
</f:facet>

the String "fullName" is outputted as the column header text.

But this has noting to do with commandSortHeader. With the attribute
"columnName" you can sort for a given value which must exist in the
column.

regards,

Gerald

On 10/29/06, ying lcs <yinglcs@gmail.com> wrote:
> i find a TOMAHAWK datatable example like following. What I don't understand is :
> why the column name on browser is 'Username', 'Full Name', 'E-mail', 'Enabled'
>
> these names are different from the 'columnname' in the tomahawk, right?
>
> Thank for any pointers.
>
> <t:dataTable id="users" var="user" style="margin-top: 10px"
>     value="#{userList.users}" rows="25" sortColumn="#{userList.sortColumn}"
>     sortAscending="#{userList.ascending}" styleClass="scrollerTable table"
>     headerClass="standardTable_Header"
> rowClasses="standardTable_Row1,standardTable_Row2"
>     columnClasses="standardTable_Column,standardTable_Column,standardTable_Column,standardTable_Column,standardTable_ColumnCentered">
>     <t:column width="25%">
>         <f:facet name="header">
>             <t:commandSortHeader columnName="username" arrow="true">
>                 <h:outputText value="#{text['user.username']}" />
>             </t:commandSortHeader>
>         </f:facet>
>         <h:commandLink action="#{userForm.edit}" value="#{user.username}">
>             <f:param name="username" value="#{user.username}"/>
>             <f:param name="from" value="list"/>
>         </h:commandLink>
>     </t:column>
>     <t:column width="34%">
>         <f:facet name="header">
>             <t:commandSortHeader columnName="fullName" arrow="true">
>                 <h:outputText value="#{text['activeUsers.fullName']}" />
>             </t:commandSortHeader>
>         </f:facet>
>         <h:outputText value="#{user.fullName}" />
>     </t:column>
>     <t:column width="25%">
>         <f:facet name="header">
>             <t:commandSortHeader columnName="email" arrow="true">
>                 <h:outputText value="#{text['user.email']}" />
>             </t:commandSortHeader>
>         </f:facet>
>         <h:outputLink value="mailto:#{user.email}">
>             <h:outputText value="#{user.email}" />
>         </h:outputLink>
>     </t:column>
>     <t:column width="16%">
>         <f:facet name="header">
>             <t:commandSortHeader columnName="enabled" arrow="true">
>                 <h:outputText value="#{text['user.enabled']}" />
>             </t:commandSortHeader>
>         </f:facet>
>         <h:selectBooleanCheckbox value="#{user.enabled}" disabled="true"/>
>     </t:column>
> </t:dataTable>
>


-- 
http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces

Mime
View raw message