You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ananya Goswami <an...@aztec.soft.net> on 2005/09/17 08:23:20 UTC

sorting table

Hi all!
	I need help on sorting a table by column headers...

My page specification is like this:

<property name="currentUser"/>
    <component id="users" type="For">
        <binding name="source" value="users"/>
        <binding name="value" value="currentUser"/>
        <binding name="element" value="literal:tr"/>
    </component>
    <component id="username" type="Insert">
        <binding name="value" value="currentUser.username"/>
    </component>
    <component id="firstName" type="Insert">
        <binding name="value" value="currentUser.firstName"/>
    </component>
    <component id="lastName" type="Insert">
        <binding name="value" value="currentUser.lastName"/>
    </component>
    
My HTML includes the following code for the table..

<table align="center" border="1" color="white" cellspacing="0"
cellpadding="0" width="60%" height="80%">
	  <thead>	
        <tr>
		    <!--<td><a href="#" onclick="this.blur(); return
sortTable('offTblBdy', 0, false);" title="User name">UserName</a></td> -->
			<td><strong><font face="arial" color="#ffffff"
size="3">Username</font></strong></td>
             <td><strong><font face="arial" color="#ffffff"
size="3">FirstName</font></strong></td>
		    <td><strong><font face="arial" color="#ffffff"
size="3">LastName</font></strong></td>
		</tr>
      </thead>
      <tbody id="offTblBdy">
		<tr jwcid="users">
		    <td><span jwcid="username"/></td>
		    <td><span jwcid="firstName"/></td>
		    <td><span jwcid="lastName"/></td>
		    
		</tr>
      </tbody>
	</table>

Please help on what to include so that I could sort table columns using
tapestry 4...



Thanks & Regards
-----------------------------
Ananya Goswami
Software Developer

-----------------------------
mail: ananyag@aztec.soft.net
mob: 09886886320
ph: 080-57561000
extn:3720
 




Re: sorting table

Posted by Tomáš Drenčák <to...@gmail.com>.
Your table seems to be a good candidate for contrib:Table. Use
informal parameters for table face and css for header.... And you have
the same logic in one component

2005/9/17, Ananya Goswami <an...@aztec.soft.net>:
> Hi all!
>         I need help on sorting a table by column headers...
> 
> My page specification is like this:
> 
> <property name="currentUser"/>
>     <component id="users" type="For">
>         <binding name="source" value="users"/>
>         <binding name="value" value="currentUser"/>
>         <binding name="element" value="literal:tr"/>
>     </component>
>     <component id="username" type="Insert">
>         <binding name="value" value="currentUser.username"/>
>     </component>
>     <component id="firstName" type="Insert">
>         <binding name="value" value="currentUser.firstName"/>
>     </component>
>     <component id="lastName" type="Insert">
>         <binding name="value" value="currentUser.lastName"/>
>     </component>
> 
> My HTML includes the following code for the table..
> 
> <table align="center" border="1" color="white" cellspacing="0"
> cellpadding="0" width="60%" height="80%">
>           <thead>
>         <tr>
>                     <!--<td><a href="#" onclick="this.blur(); return
> sortTable('offTblBdy', 0, false);" title="User name">UserName</a></td> -->
>                         <td><strong><font face="arial" color="#ffffff"
> size="3">Username</font></strong></td>
>              <td><strong><font face="arial" color="#ffffff"
> size="3">FirstName</font></strong></td>
>                     <td><strong><font face="arial" color="#ffffff"
> size="3">LastName</font></strong></td>
>                 </tr>
>       </thead>
>       <tbody id="offTblBdy">
>                 <tr jwcid="users">
>                     <td><span jwcid="username"/></td>
>                     <td><span jwcid="firstName"/></td>
>                     <td><span jwcid="lastName"/></td>
> 
>                 </tr>
>       </tbody>
>         </table>
> 
> Please help on what to include so that I could sort table columns using
> tapestry 4...
> 
> 
> 
> Thanks & Regards
> -----------------------------
> Ananya Goswami
> Software Developer
> 
> -----------------------------
> mail: ananyag@aztec.soft.net
> mob: 09886886320
> ph: 080-57561000
> extn:3720
> 
> 
> 
> 
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org