myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ying lcs" <ying...@gmail.com>
Subject Re: Question about TOMAHAWK datatable example
Date Sun, 29 Oct 2006 17:56:38 GMT
Thanks.  I have a related question about data table.
I have a 3 columns table like this. it works (it displays the result
as expected).

But when i click a table body cell on the 2nd column, the page just
hangs there  (the browser just should a loading cursor and never get
out).  My question is why? The 2nd column of my data table is just
text. It should not do anything.

Thank you for any help.

<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_ColumnCentered">
    <t:column width="33%">
        <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="42%">
        <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="enabled" arrow="true">
                <h:outputText value="#{text['user.enabled']}" />
            </t:commandSortHeader>
        </f:facet>
        <h:selectBooleanCheckbox value="#{user.enabled}" disabled="true"/>
    </t:column>
</t:dataTable>

On 10/29/06, Gerald Müllan <bierbrauen@gmail.com> wrote:
> 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