myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Mayer (JIRA)" <myfaces-...@incubator.apache.org>
Subject [jira] Commented: (MYFACES-224) x:dataTable, x:columns and x:commandSortHeader not sorting the data
Date Mon, 02 May 2005 13:20:06 GMT
     [ http://issues.apache.org/jira/browse/MYFACES-224?page=comments#action_64252 ]
     
Alex Mayer commented on MYFACES-224:
------------------------------------

I redownloaded 1.0.9 final but no change, the data is not sorted. I attached the source of
the html-page of the first rendered page.
Please look yourself whether it contains "the valid ids", because I don't know which ones
you are refering to.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
    <head>
        <title></title>
    </head>
    <body>
        <table id="_id0:data">
            <thead>
                <tr>
                    <th>
                        <input type="checkbox" name="_id0:data:_id3:0:_id5" />
                        <a href="#" onclick="clear__5Fid0();document.forms['_id0'].elements['_id0:_link_hidden_'].value='_id0:data:_id3:0:_id6';if(document.forms['_id0'].onsubmit){document.forms['_id0'].onsubmit();}document.forms['_id0'].submit();return
false;" id="_id0:data:_id3:0:_id6">header1&#x2191;</a>
                    </th
                    ><th>
                        <input type="checkbox" name="_id0:data:_id3:0:_id5" />
                        <a href="#" onclick="clear__5Fid0();document.forms['_id0'].elements['_id0:_link_hidden_'].value='_id0:data:_id3:0:_id6';if(document.forms['_id0'].onsubmit){document.forms['_id0'].onsubmit();}document.forms['_id0'].submit();return
false;" id="_id0:data:_id3:0:_id6">header2</a>
                    </th>
                    <th>
                        <input type="checkbox" name="_id0:data:_id3:0:_id5" />
                        <a href="#" onclick="clear__5Fid0();document.forms['_id0'].elements['_id0:_link_hidden_'].value='_id0:data:_id3:0:_id6';if(document.forms['_id0'].onsubmit){document.forms['_id0'].onsubmit();}document.forms['_id0'].submit();return
false;" id="_id0:data:_id3:0:_id6">header3</a>
                    </th>
                    <th>
                        <input type="checkbox" name="_id0:data:_id3:0:_id5" />
                        <a href="#" onclick="clear__5Fid0();document.forms['_id0'].elements['_id0:_link_hidden_'].value='_id0:data:_id3:0:_id6';if(document.forms['_id0'].onsubmit){document.forms['_id0'].onsubmit();}document.forms['_id0'].submit();return
false;" id="_id0:data:_id3:0:_id6">header4</a>
                    </th>
                    <th>select</th>
                </tr>
            </thead>
            <tbody>
            <tr>
                <td>val1</td>
                <td>string1</td>
                <td>b1</td>
                <td>d</td>
                <td>
                    <input type="checkbox" name="_id0:data:_id10" />
                </td>
            </tr>

            <tr>
                <td>val2</td>
                <td>string5</td>
                <td>dsdf</td>
                <td>lorem</td>
                <td>
                    <input type="checkbox" name="_id0:data:_id10" />
                </td>
            </tr>
            <tr>
                <td>val3</td>
                <td>anotherstring</td>
                <td>werws</td>
                <td>ipsum</td>
                <td>
                    <input type="checkbox" name="_id0:data:_id10" />
                </td>
            </tr>
        </table>
    </body>
</html>

> x:dataTable, x:columns and x:commandSortHeader not sorting the data
> -------------------------------------------------------------------
>
>          Key: MYFACES-224
>          URL: http://issues.apache.org/jira/browse/MYFACES-224
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.0.9 beta
>  Environment: tomcat5.5, java5 update 3,
>     Reporter: Alex Mayer

>
> The x:commandSortHeader is not working if nested inside of x:columns (which is nested
in x:dataTable)
> my code is like this:
> <x:dataTable id="data" value="#{manager.sortList.dataObjectsToSort}" var="b" rows="4"
>                    sortColumn="#{manager.sortList.sort}" sortAscending="#{manager.sortList.ascending}"
>                     preserveSort="true" preserveDataModel="true">   
>                           
>                     <x:columns value="#{manager.headerStrings}" var="column">
>                         <f:facet name="header">  
>                             <h:panelGroup>
>                                 <h:selectBooleanCheckbox />
>                                 <x:commandSortHeader columnName="#{column}" arrow="true">
>                                     <h:outputText value="#{column}" />
>                                 </x:commandSortHeader> 
>                             </h:panelGroup>
>                         </f:facet>
>                         <h:outputText value="#{b[column]}" />
>                     </x:columns>
> </x:dataTable>
> in case I use a component-binding for the x:dataTable to generate a corresponding table
in a bean, everything works fine.              
> I believe this is, because the x:columns-tag assigns to every childcomponent of type
commandSortHeader the same id.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message