You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by cleverpig <gr...@gmail.com> on 2009/09/16 14:06:59 UTC

T5:how to use rowIndex in Grid component?

I got this define from tapestry5's guide document:
http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html

rowIndex:Optional output parameter (only set during rendering) that
identifies the current row index. This is the index on the page (i.e.,
always numbered from zero) as opposed to the row index inside the
GridDataSource.

I think this is a row number property that can be used to display row
number in front of each row.
but i can't find what's useful example code for developer.

Newbie need help now! and i will help other with my best!~
-- 
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liudan@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: www.cleverpig.name
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
新浪微博: t.sina.com.cn/cleverpig
Organization: www.beijing-open-party.org
Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294

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


Re: T5:how to use rowIndex in Grid component?

Posted by cleverpig <gr...@gmail.com>.
thanks!!!
I got! but when you turn to another page,the rowindex will be
calculate from zero..
there is good way from lombok
project:http://lombok.demon.co.uk/tapestry5Demo/test/accessgrid

2009/9/17 DH <ni...@gmail.com>:
> yes.
>
> I am sorry that I gave the wrong example.
>
> <p:rowNumber> should be <p:rowNumberCell>.
>
> Append the 'Cell' and will work.
>
> DH
> http://www.gaonline.com.cn
>
> ----- Original Message -----
> From: "cleverpig" <gr...@gmail.com>
> To: "Tapestry users" <us...@tapestry.apache.org>
> Sent: Thursday, September 17, 2009 11:38 AM
> Subject: Re: T5:how to use rowIndex in Grid component?
>
>
> To HD:
>
> namespace p is only the "t:parameter" 's shortcut? so i can use
> "t:parameter" to replace "p:"..
>
> On Thu, Sep 17, 2009 at 11:26 AM, cleverpig <gr...@gmail.com> wrote:
>> oh,i'd added this description. namespace p works now!
>> so i ran app,found this rowNumber Column was empty...it didn't display
>> the value:${var:rowIndex}... :(
>>
>> 2009/9/17 DH <ni...@gmail.com>:
>>> Hey, do it yourself^_^ It was introduced in T5.1.
>>>
>>> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
>>>  xmlns:p="tapestry:parameter">
>>> </html>
>>>
>>> DH
>>> http://www.gaonline.com.cn
>>>
>>> ----- Original Message -----
>>> From: "cleverpig"
>>> To: "Tapestry users" <us...@tapestry.apache.org>
>>> Sent: Thursday, September 17, 2009 11:08 AM
>>> Subject: Re: T5:how to use rowIndex in Grid component?
>>>
>>>
>>> oh,thank DH!
>>>
>>> but there is a wrong:Undeclared namespace prefix "p"..your example
>>> code would be mistake..:(
>>>
>>> On Thu, Sep 17, 2009 at 9:50 AM, DH <ni...@gmail.com> wrote:
>>>> If you want to show the row num in front of each row, take an user (with bean property lastname and firstname) list for example, I assume your data source 'userSource' is prepared.
>>>>
>>>> <table t:type="grid" t:source="userSource" add="rowNumber" reorder="rowNumber" rowIndex="var:rowIndex">
>>>>    <p:rowNumber>
>>>>        ${var:rowIndex}
>>>>    </p:rowNumber>
>>>> </table>
>>>>
>>>> Note: It begins from 0. And I haven't test it at all but should almost work.
>>>>
>>>> DH
>>>> http://www.gaonline.com.cn
>>>>
>>>> ----- Original Message -----
>>>> From: "cleverpig" <gr...@gmail.com>
>>>> To: "Tapestry users" <us...@tapestry.apache.org>
>>>> Sent: Thursday, September 17, 2009 8:57 AM
>>>> Subject: Re: T5:how to use rowIndex in Grid component?
>>>>
>>>>
>>>> anyone have idea on this?
>>>>
>>>> On Wed, Sep 16, 2009 at 8:06 PM, cleverpig <gr...@gmail.com> wrote:
>>>>> I got this define from tapestry5's guide document:
>>>>> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html
>>>>>
>>>>> rowIndex:Optional output parameter (only set during rendering) that
>>>>> identifies the current row index. This is the index on the page (i.e.,
>>>>> always numbered from zero) as opposed to the row index inside the
>>>>> GridDataSource.
>>>>>
>>>>> I think this is a row number property that can be used to display row
>>>>> number in front of each row.
>>>>> but i can't find what's useful example code for developer.
>>>>>
>>>>> Newbie need help now! and i will help other with my best!~
>>>>> --
>>>>> cleverpig(Dan)
>>>>> Location: Beijing
>>>>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>>>>> Zipcode: 100031
>>>>> MSN: great_liudan@hotmail.com
>>>>> QQ: 149291732
>>>>> Skype: cleverpigatmatrix
>>>>> Facebook ID:cleverpig
>>>>> Blog: www.cleverpig.name
>>>>> Tags: del.icio.us/cleverpig
>>>>> Twitter: twitter.com/cleverpig
>>>>> 新浪微博: t.sina.com.cn/cleverpig
>>>>> Organization: www.beijing-open-party.org
>>>>> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> cleverpig(Dan)
>>>> Location: Beijing
>>>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>>>> Zipcode: 100031
>>>> MSN: great_liudan@hotmail.com
>>>> QQ: 149291732
>>>> Skype: cleverpigatmatrix
>>>> Facebook ID:cleverpig
>>>> Blog: www.cleverpig.name
>>>> Tags: del.icio.us/cleverpig
>>>> Twitter: twitter.com/cleverpig
>>>> 新浪微博: t.sina.com.cn/cleverpig
>>>> Organization: www.beijing-open-party.org
>>>> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> cleverpig(Dan)
>>> Location: Beijing
>>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>>> Zipcode: 100031
>>> MSN: great_liudan@hotmail.com
>>> QQ: 149291732
>>> Skype: cleverpigatmatrix
>>> Facebook ID:cleverpig
>>> Blog: www.cleverpig.name
>>> Tags: del.icio.us/cleverpig
>>> Twitter: twitter.com/cleverpig
>>> 新浪微博: t.sina.com.cn/cleverpig
>>> Organization: www.beijing-open-party.org
>>> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> cleverpig(Dan)
>> Location: Beijing
>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>> Zipcode: 100031
>> MSN: great_liudan@hotmail.com
>> QQ: 149291732
>> Skype: cleverpigatmatrix
>> Facebook ID:cleverpig
>> Blog: www.cleverpig.name
>> Tags: del.icio.us/cleverpig
>> Twitter: twitter.com/cleverpig
>> 新浪微博: t.sina.com.cn/cleverpig
>> Organization: www.beijing-open-party.org
>> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>>
>
>
>
> --
> cleverpig(Dan)
> Location: Beijing
> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
> Zipcode: 100031
> MSN: great_liudan@hotmail.com
> QQ: 149291732
> Skype: cleverpigatmatrix
> Facebook ID:cleverpig
> Blog: www.cleverpig.name
> Tags: del.icio.us/cleverpig
> Twitter: twitter.com/cleverpig
> 新浪微博: t.sina.com.cn/cleverpig
> Organization: www.beijing-open-party.org
> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liudan@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: www.cleverpig.name
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
新浪微博: t.sina.com.cn/cleverpig
Organization: www.beijing-open-party.org
Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294

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


Re: T5:how to use rowIndex in Grid component?

Posted by DH <ni...@gmail.com>.
yes.

I am sorry that I gave the wrong example.

<p:rowNumber> should be <p:rowNumberCell>.

Append the 'Cell' and will work.

DH
http://www.gaonline.com.cn

----- Original Message ----- 
From: "cleverpig" <gr...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Thursday, September 17, 2009 11:38 AM
Subject: Re: T5:how to use rowIndex in Grid component?


To HD:

namespace p is only the "t:parameter" 's shortcut? so i can use
"t:parameter" to replace "p:"..

On Thu, Sep 17, 2009 at 11:26 AM, cleverpig <gr...@gmail.com> wrote:
> oh,i'd added this description. namespace p works now!
> so i ran app,found this rowNumber Column was empty...it didn't display
> the value:${var:rowIndex}... :(
>
> 2009/9/17 DH <ni...@gmail.com>:
>> Hey, do it yourself^_^ It was introduced in T5.1.
>>
>> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
>>  xmlns:p="tapestry:parameter">
>> </html>
>>
>> DH
>> http://www.gaonline.com.cn
>>
>> ----- Original Message -----
>> From: "cleverpig"
>> To: "Tapestry users" <us...@tapestry.apache.org>
>> Sent: Thursday, September 17, 2009 11:08 AM
>> Subject: Re: T5:how to use rowIndex in Grid component?
>>
>>
>> oh,thank DH!
>>
>> but there is a wrong:Undeclared namespace prefix "p"..your example
>> code would be mistake..:(
>>
>> On Thu, Sep 17, 2009 at 9:50 AM, DH <ni...@gmail.com> wrote:
>>> If you want to show the row num in front of each row, take an user (with bean property lastname and firstname) list for example, I assume your data source 'userSource' is prepared.
>>>
>>> <table t:type="grid" t:source="userSource" add="rowNumber" reorder="rowNumber" rowIndex="var:rowIndex">
>>>    <p:rowNumber>
>>>        ${var:rowIndex}
>>>    </p:rowNumber>
>>> </table>
>>>
>>> Note: It begins from 0. And I haven't test it at all but should almost work.
>>>
>>> DH
>>> http://www.gaonline.com.cn
>>>
>>> ----- Original Message -----
>>> From: "cleverpig" <gr...@gmail.com>
>>> To: "Tapestry users" <us...@tapestry.apache.org>
>>> Sent: Thursday, September 17, 2009 8:57 AM
>>> Subject: Re: T5:how to use rowIndex in Grid component?
>>>
>>>
>>> anyone have idea on this?
>>>
>>> On Wed, Sep 16, 2009 at 8:06 PM, cleverpig <gr...@gmail.com> wrote:
>>>> I got this define from tapestry5's guide document:
>>>> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html
>>>>
>>>> rowIndex:Optional output parameter (only set during rendering) that
>>>> identifies the current row index. This is the index on the page (i.e.,
>>>> always numbered from zero) as opposed to the row index inside the
>>>> GridDataSource.
>>>>
>>>> I think this is a row number property that can be used to display row
>>>> number in front of each row.
>>>> but i can't find what's useful example code for developer.
>>>>
>>>> Newbie need help now! and i will help other with my best!~
>>>> --
>>>> cleverpig(Dan)
>>>> Location: Beijing
>>>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>>>> Zipcode: 100031
>>>> MSN: great_liudan@hotmail.com
>>>> QQ: 149291732
>>>> Skype: cleverpigatmatrix
>>>> Facebook ID:cleverpig
>>>> Blog: www.cleverpig.name
>>>> Tags: del.icio.us/cleverpig
>>>> Twitter: twitter.com/cleverpig
>>>> 新浪微博: t.sina.com.cn/cleverpig
>>>> Organization: www.beijing-open-party.org
>>>> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>>>>
>>>
>>>
>>>
>>> --
>>> cleverpig(Dan)
>>> Location: Beijing
>>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>>> Zipcode: 100031
>>> MSN: great_liudan@hotmail.com
>>> QQ: 149291732
>>> Skype: cleverpigatmatrix
>>> Facebook ID:cleverpig
>>> Blog: www.cleverpig.name
>>> Tags: del.icio.us/cleverpig
>>> Twitter: twitter.com/cleverpig
>>> 新浪微博: t.sina.com.cn/cleverpig
>>> Organization: www.beijing-open-party.org
>>> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> cleverpig(Dan)
>> Location: Beijing
>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>> Zipcode: 100031
>> MSN: great_liudan@hotmail.com
>> QQ: 149291732
>> Skype: cleverpigatmatrix
>> Facebook ID:cleverpig
>> Blog: www.cleverpig.name
>> Tags: del.icio.us/cleverpig
>> Twitter: twitter.com/cleverpig
>> 新浪微博: t.sina.com.cn/cleverpig
>> Organization: www.beijing-open-party.org
>> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> --
> cleverpig(Dan)
> Location: Beijing
> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
> Zipcode: 100031
> MSN: great_liudan@hotmail.com
> QQ: 149291732
> Skype: cleverpigatmatrix
> Facebook ID:cleverpig
> Blog: www.cleverpig.name
> Tags: del.icio.us/cleverpig
> Twitter: twitter.com/cleverpig
> 新浪微博: t.sina.com.cn/cleverpig
> Organization: www.beijing-open-party.org
> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>



-- 
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liudan@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: www.cleverpig.name
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
新浪微博: t.sina.com.cn/cleverpig
Organization: www.beijing-open-party.org
Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294

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


Re: T5:how to use rowIndex in Grid component?

Posted by cleverpig <gr...@gmail.com>.
To HD:

namespace p is only the "t:parameter" 's shortcut? so i can use
"t:parameter" to replace "p:"..

On Thu, Sep 17, 2009 at 11:26 AM, cleverpig <gr...@gmail.com> wrote:
> oh,i'd added this description. namespace p works now!
> so i ran app,found this rowNumber Column was empty...it didn't display
> the value:${var:rowIndex}... :(
>
> 2009/9/17 DH <ni...@gmail.com>:
>> Hey, do it yourself^_^ It was introduced in T5.1.
>>
>> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
>>  xmlns:p="tapestry:parameter">
>> </html>
>>
>> DH
>> http://www.gaonline.com.cn
>>
>> ----- Original Message -----
>> From: "cleverpig"
>> To: "Tapestry users" <us...@tapestry.apache.org>
>> Sent: Thursday, September 17, 2009 11:08 AM
>> Subject: Re: T5:how to use rowIndex in Grid component?
>>
>>
>> oh,thank DH!
>>
>> but there is a wrong:Undeclared namespace prefix "p"..your example
>> code would be mistake..:(
>>
>> On Thu, Sep 17, 2009 at 9:50 AM, DH <ni...@gmail.com> wrote:
>>> If you want to show the row num in front of each row, take an user (with bean property lastname and firstname) list for example, I assume your data source 'userSource' is prepared.
>>>
>>> <table t:type="grid" t:source="userSource" add="rowNumber" reorder="rowNumber" rowIndex="var:rowIndex">
>>>    <p:rowNumber>
>>>        ${var:rowIndex}
>>>    </p:rowNumber>
>>> </table>
>>>
>>> Note: It begins from 0. And I haven't test it at all but should almost work.
>>>
>>> DH
>>> http://www.gaonline.com.cn
>>>
>>> ----- Original Message -----
>>> From: "cleverpig" <gr...@gmail.com>
>>> To: "Tapestry users" <us...@tapestry.apache.org>
>>> Sent: Thursday, September 17, 2009 8:57 AM
>>> Subject: Re: T5:how to use rowIndex in Grid component?
>>>
>>>
>>> anyone have idea on this?
>>>
>>> On Wed, Sep 16, 2009 at 8:06 PM, cleverpig <gr...@gmail.com> wrote:
>>>> I got this define from tapestry5's guide document:
>>>> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html
>>>>
>>>> rowIndex:Optional output parameter (only set during rendering) that
>>>> identifies the current row index. This is the index on the page (i.e.,
>>>> always numbered from zero) as opposed to the row index inside the
>>>> GridDataSource.
>>>>
>>>> I think this is a row number property that can be used to display row
>>>> number in front of each row.
>>>> but i can't find what's useful example code for developer.
>>>>
>>>> Newbie need help now! and i will help other with my best!~
>>>> --
>>>> cleverpig(Dan)
>>>> Location: Beijing
>>>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>>>> Zipcode: 100031
>>>> MSN: great_liudan@hotmail.com
>>>> QQ: 149291732
>>>> Skype: cleverpigatmatrix
>>>> Facebook ID:cleverpig
>>>> Blog: www.cleverpig.name
>>>> Tags: del.icio.us/cleverpig
>>>> Twitter: twitter.com/cleverpig
>>>> 新浪微博: t.sina.com.cn/cleverpig
>>>> Organization: www.beijing-open-party.org
>>>> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>>>>
>>>
>>>
>>>
>>> --
>>> cleverpig(Dan)
>>> Location: Beijing
>>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>>> Zipcode: 100031
>>> MSN: great_liudan@hotmail.com
>>> QQ: 149291732
>>> Skype: cleverpigatmatrix
>>> Facebook ID:cleverpig
>>> Blog: www.cleverpig.name
>>> Tags: del.icio.us/cleverpig
>>> Twitter: twitter.com/cleverpig
>>> 新浪微博: t.sina.com.cn/cleverpig
>>> Organization: www.beijing-open-party.org
>>> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> cleverpig(Dan)
>> Location: Beijing
>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>> Zipcode: 100031
>> MSN: great_liudan@hotmail.com
>> QQ: 149291732
>> Skype: cleverpigatmatrix
>> Facebook ID:cleverpig
>> Blog: www.cleverpig.name
>> Tags: del.icio.us/cleverpig
>> Twitter: twitter.com/cleverpig
>> 新浪微博: t.sina.com.cn/cleverpig
>> Organization: www.beijing-open-party.org
>> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> --
> cleverpig(Dan)
> Location: Beijing
> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
> Zipcode: 100031
> MSN: great_liudan@hotmail.com
> QQ: 149291732
> Skype: cleverpigatmatrix
> Facebook ID:cleverpig
> Blog: www.cleverpig.name
> Tags: del.icio.us/cleverpig
> Twitter: twitter.com/cleverpig
> 新浪微博: t.sina.com.cn/cleverpig
> Organization: www.beijing-open-party.org
> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>



-- 
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liudan@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: www.cleverpig.name
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
新浪微博: t.sina.com.cn/cleverpig
Organization: www.beijing-open-party.org
Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294

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


Re: T5:how to use rowIndex in Grid component?

Posted by cleverpig <gr...@gmail.com>.
oh,i'd added this description. namespace p works now!
so i ran app,found this rowNumber Column was empty...it didn't display
the value:${var:rowIndex}... :(

2009/9/17 DH <ni...@gmail.com>:
> Hey, do it yourself^_^ It was introduced in T5.1.
>
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
>  xmlns:p="tapestry:parameter">
> </html>
>
> DH
> http://www.gaonline.com.cn
>
> ----- Original Message -----
> From: "cleverpig"
> To: "Tapestry users" <us...@tapestry.apache.org>
> Sent: Thursday, September 17, 2009 11:08 AM
> Subject: Re: T5:how to use rowIndex in Grid component?
>
>
> oh,thank DH!
>
> but there is a wrong:Undeclared namespace prefix "p"..your example
> code would be mistake..:(
>
> On Thu, Sep 17, 2009 at 9:50 AM, DH <ni...@gmail.com> wrote:
>> If you want to show the row num in front of each row, take an user (with bean property lastname and firstname) list for example, I assume your data source 'userSource' is prepared.
>>
>> <table t:type="grid" t:source="userSource" add="rowNumber" reorder="rowNumber" rowIndex="var:rowIndex">
>>    <p:rowNumber>
>>        ${var:rowIndex}
>>    </p:rowNumber>
>> </table>
>>
>> Note: It begins from 0. And I haven't test it at all but should almost work.
>>
>> DH
>> http://www.gaonline.com.cn
>>
>> ----- Original Message -----
>> From: "cleverpig" <gr...@gmail.com>
>> To: "Tapestry users" <us...@tapestry.apache.org>
>> Sent: Thursday, September 17, 2009 8:57 AM
>> Subject: Re: T5:how to use rowIndex in Grid component?
>>
>>
>> anyone have idea on this?
>>
>> On Wed, Sep 16, 2009 at 8:06 PM, cleverpig <gr...@gmail.com> wrote:
>>> I got this define from tapestry5's guide document:
>>> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html
>>>
>>> rowIndex:Optional output parameter (only set during rendering) that
>>> identifies the current row index. This is the index on the page (i.e.,
>>> always numbered from zero) as opposed to the row index inside the
>>> GridDataSource.
>>>
>>> I think this is a row number property that can be used to display row
>>> number in front of each row.
>>> but i can't find what's useful example code for developer.
>>>
>>> Newbie need help now! and i will help other with my best!~
>>> --
>>> cleverpig(Dan)
>>> Location: Beijing
>>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>>> Zipcode: 100031
>>> MSN: great_liudan@hotmail.com
>>> QQ: 149291732
>>> Skype: cleverpigatmatrix
>>> Facebook ID:cleverpig
>>> Blog: www.cleverpig.name
>>> Tags: del.icio.us/cleverpig
>>> Twitter: twitter.com/cleverpig
>>> 新浪微博: t.sina.com.cn/cleverpig
>>> Organization: www.beijing-open-party.org
>>> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>>>
>>
>>
>>
>> --
>> cleverpig(Dan)
>> Location: Beijing
>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>> Zipcode: 100031
>> MSN: great_liudan@hotmail.com
>> QQ: 149291732
>> Skype: cleverpigatmatrix
>> Facebook ID:cleverpig
>> Blog: www.cleverpig.name
>> Tags: del.icio.us/cleverpig
>> Twitter: twitter.com/cleverpig
>> 新浪微博: t.sina.com.cn/cleverpig
>> Organization: www.beijing-open-party.org
>> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> --
> cleverpig(Dan)
> Location: Beijing
> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
> Zipcode: 100031
> MSN: great_liudan@hotmail.com
> QQ: 149291732
> Skype: cleverpigatmatrix
> Facebook ID:cleverpig
> Blog: www.cleverpig.name
> Tags: del.icio.us/cleverpig
> Twitter: twitter.com/cleverpig
> 新浪微博: t.sina.com.cn/cleverpig
> Organization: www.beijing-open-party.org
> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liudan@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: www.cleverpig.name
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
新浪微博: t.sina.com.cn/cleverpig
Organization: www.beijing-open-party.org
Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294

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


Re: T5:how to use rowIndex in Grid component?

Posted by DH <ni...@gmail.com>.
Hey, do it yourself^_^ It was introduced in T5.1.

<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
 xmlns:p="tapestry:parameter">
</html>

DH
http://www.gaonline.com.cn

----- Original Message ----- 
From: "cleverpig" 
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Thursday, September 17, 2009 11:08 AM
Subject: Re: T5:how to use rowIndex in Grid component?


oh,thank DH!

but there is a wrong:Undeclared namespace prefix "p"..your example
code would be mistake..:(

On Thu, Sep 17, 2009 at 9:50 AM, DH <ni...@gmail.com> wrote:
> If you want to show the row num in front of each row, take an user (with bean property lastname and firstname) list for example, I assume your data source 'userSource' is prepared.
>
> <table t:type="grid" t:source="userSource" add="rowNumber" reorder="rowNumber" rowIndex="var:rowIndex">
>    <p:rowNumber>
>        ${var:rowIndex}
>    </p:rowNumber>
> </table>
>
> Note: It begins from 0. And I haven't test it at all but should almost work.
>
> DH
> http://www.gaonline.com.cn
>
> ----- Original Message -----
> From: "cleverpig" <gr...@gmail.com>
> To: "Tapestry users" <us...@tapestry.apache.org>
> Sent: Thursday, September 17, 2009 8:57 AM
> Subject: Re: T5:how to use rowIndex in Grid component?
>
>
> anyone have idea on this?
>
> On Wed, Sep 16, 2009 at 8:06 PM, cleverpig <gr...@gmail.com> wrote:
>> I got this define from tapestry5's guide document:
>> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html
>>
>> rowIndex:Optional output parameter (only set during rendering) that
>> identifies the current row index. This is the index on the page (i.e.,
>> always numbered from zero) as opposed to the row index inside the
>> GridDataSource.
>>
>> I think this is a row number property that can be used to display row
>> number in front of each row.
>> but i can't find what's useful example code for developer.
>>
>> Newbie need help now! and i will help other with my best!~
>> --
>> cleverpig(Dan)
>> Location: Beijing
>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>> Zipcode: 100031
>> MSN: great_liudan@hotmail.com
>> QQ: 149291732
>> Skype: cleverpigatmatrix
>> Facebook ID:cleverpig
>> Blog: www.cleverpig.name
>> Tags: del.icio.us/cleverpig
>> Twitter: twitter.com/cleverpig
>> 新浪微博: t.sina.com.cn/cleverpig
>> Organization: www.beijing-open-party.org
>> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>>
>
>
>
> --
> cleverpig(Dan)
> Location: Beijing
> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
> Zipcode: 100031
> MSN: great_liudan@hotmail.com
> QQ: 149291732
> Skype: cleverpigatmatrix
> Facebook ID:cleverpig
> Blog: www.cleverpig.name
> Tags: del.icio.us/cleverpig
> Twitter: twitter.com/cleverpig
> 新浪微博: t.sina.com.cn/cleverpig
> Organization: www.beijing-open-party.org
> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liudan@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: www.cleverpig.name
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
新浪微博: t.sina.com.cn/cleverpig
Organization: www.beijing-open-party.org
Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294

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


Re: T5:how to use rowIndex in Grid component?

Posted by cleverpig <gr...@gmail.com>.
oh,thank DH!

but there is a wrong:Undeclared namespace prefix "p"..your example
code would be mistake..:(

On Thu, Sep 17, 2009 at 9:50 AM, DH <ni...@gmail.com> wrote:
> If you want to show the row num in front of each row, take an user (with bean property lastname and firstname) list for example, I assume your data source 'userSource' is prepared.
>
> <table t:type="grid" t:source="userSource" add="rowNumber" reorder="rowNumber" rowIndex="var:rowIndex">
>    <p:rowNumber>
>        ${var:rowIndex}
>    </p:rowNumber>
> </table>
>
> Note: It begins from 0. And I haven't test it at all but should almost work.
>
> DH
> http://www.gaonline.com.cn
>
> ----- Original Message -----
> From: "cleverpig" <gr...@gmail.com>
> To: "Tapestry users" <us...@tapestry.apache.org>
> Sent: Thursday, September 17, 2009 8:57 AM
> Subject: Re: T5:how to use rowIndex in Grid component?
>
>
> anyone have idea on this?
>
> On Wed, Sep 16, 2009 at 8:06 PM, cleverpig <gr...@gmail.com> wrote:
>> I got this define from tapestry5's guide document:
>> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html
>>
>> rowIndex:Optional output parameter (only set during rendering) that
>> identifies the current row index. This is the index on the page (i.e.,
>> always numbered from zero) as opposed to the row index inside the
>> GridDataSource.
>>
>> I think this is a row number property that can be used to display row
>> number in front of each row.
>> but i can't find what's useful example code for developer.
>>
>> Newbie need help now! and i will help other with my best!~
>> --
>> cleverpig(Dan)
>> Location: Beijing
>> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
>> Zipcode: 100031
>> MSN: great_liudan@hotmail.com
>> QQ: 149291732
>> Skype: cleverpigatmatrix
>> Facebook ID:cleverpig
>> Blog: www.cleverpig.name
>> Tags: del.icio.us/cleverpig
>> Twitter: twitter.com/cleverpig
>> 新浪微博: t.sina.com.cn/cleverpig
>> Organization: www.beijing-open-party.org
>> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>>
>
>
>
> --
> cleverpig(Dan)
> Location: Beijing
> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
> Zipcode: 100031
> MSN: great_liudan@hotmail.com
> QQ: 149291732
> Skype: cleverpigatmatrix
> Facebook ID:cleverpig
> Blog: www.cleverpig.name
> Tags: del.icio.us/cleverpig
> Twitter: twitter.com/cleverpig
> 新浪微博: t.sina.com.cn/cleverpig
> Organization: www.beijing-open-party.org
> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liudan@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: www.cleverpig.name
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
新浪微博: t.sina.com.cn/cleverpig
Organization: www.beijing-open-party.org
Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294

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


Re: T5:how to use rowIndex in Grid component?

Posted by DH <ni...@gmail.com>.
If you want to show the row num in front of each row, take an user (with bean property lastname and firstname) list for example, I assume your data source 'userSource' is prepared.

<table t:type="grid" t:source="userSource" add="rowNumber" reorder="rowNumber" rowIndex="var:rowIndex">
    <p:rowNumber>
        ${var:rowIndex}
    </p:rowNumber>
</table>

Note: It begins from 0. And I haven't test it at all but should almost work.

DH
http://www.gaonline.com.cn

----- Original Message ----- 
From: "cleverpig" <gr...@gmail.com>
To: "Tapestry users" <us...@tapestry.apache.org>
Sent: Thursday, September 17, 2009 8:57 AM
Subject: Re: T5:how to use rowIndex in Grid component?


anyone have idea on this?

On Wed, Sep 16, 2009 at 8:06 PM, cleverpig <gr...@gmail.com> wrote:
> I got this define from tapestry5's guide document:
> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html
>
> rowIndex:Optional output parameter (only set during rendering) that
> identifies the current row index. This is the index on the page (i.e.,
> always numbered from zero) as opposed to the row index inside the
> GridDataSource.
>
> I think this is a row number property that can be used to display row
> number in front of each row.
> but i can't find what's useful example code for developer.
>
> Newbie need help now! and i will help other with my best!~
> --
> cleverpig(Dan)
> Location: Beijing
> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
> Zipcode: 100031
> MSN: great_liudan@hotmail.com
> QQ: 149291732
> Skype: cleverpigatmatrix
> Facebook ID:cleverpig
> Blog: www.cleverpig.name
> Tags: del.icio.us/cleverpig
> Twitter: twitter.com/cleverpig
> 新浪微博: t.sina.com.cn/cleverpig
> Organization: www.beijing-open-party.org
> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>



-- 
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liudan@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: www.cleverpig.name
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
新浪微博: t.sina.com.cn/cleverpig
Organization: www.beijing-open-party.org
Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294

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


Re: T5:how to use rowIndex in Grid component?

Posted by cleverpig <gr...@gmail.com>.
anyone have idea on this?

On Wed, Sep 16, 2009 at 8:06 PM, cleverpig <gr...@gmail.com> wrote:
> I got this define from tapestry5's guide document:
> http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/Grid.html
>
> rowIndex:Optional output parameter (only set during rendering) that
> identifies the current row index. This is the index on the page (i.e.,
> always numbered from zero) as opposed to the row index inside the
> GridDataSource.
>
> I think this is a row number property that can be used to display row
> number in front of each row.
> but i can't find what's useful example code for developer.
>
> Newbie need help now! and i will help other with my best!~
> --
> cleverpig(Dan)
> Location: Beijing
> Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
> Zipcode: 100031
> MSN: great_liudan@hotmail.com
> QQ: 149291732
> Skype: cleverpigatmatrix
> Facebook ID:cleverpig
> Blog: www.cleverpig.name
> Tags: del.icio.us/cleverpig
> Twitter: twitter.com/cleverpig
> 新浪微博: t.sina.com.cn/cleverpig
> Organization: www.beijing-open-party.org
> Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294
>



-- 
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: great_liudan@hotmail.com
QQ: 149291732
Skype: cleverpigatmatrix
Facebook ID:cleverpig
Blog: www.cleverpig.name
Tags: del.icio.us/cleverpig
Twitter: twitter.com/cleverpig
新浪微博: t.sina.com.cn/cleverpig
Organization: www.beijing-open-party.org
Organ@Facebook: http://www.facebook.com/group.php?gid=8159558294

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