wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Renz <s.r...@efonds.com>
Subject Re: Access the row index in an AbstractColumn?
Date Tue, 21 Apr 2015 19:21:01 GMT
Hi Andrew,

many thanks for the pointer.

It's actually ((Item)cellItem.getParent().getParent()).getIndex() as
mentioned in the nabble thread.

I never would have guessed ;-)

Thanks again very much.

Bye,
    Stefan


Andrew Geery wrote:
> See
> http://apache-wicket.1842946.n4.nabble.com/DataTable-how-to-make-a-column-showing-the-row-number-td1855450.html
> :
> 
> public void populateItem(Item cell, String compId, IModel rowModel) {
> item.getindex() is cell, ((item)item.getparent()).getindex() is row
> 
> On Tue, Apr 21, 2015 at 2:35 PM, Stefan Renz <s.renz@efonds.com> wrote:
> 
>> Hi,
>>
>> my client asked me to implement a simple row numbering in a data table.
>> What I have is a Panel with a DataTable, with a varying number of
>> IColumns. I thought that I could add such a row number column
>> implementation in virtually no time, but it turns out that the index
>> returned by populateItem's Item argument is not the row number, but the
>> column number. I've been looking all around, but I can't seem to be able
>> to find the row number index.
>>
>> Any idea how to do that in a DataTable AbstractColumn implementation?
>>
>> Thanks for your help.
>>
>> Bye
>>     Stefan
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
> 

-- 
im Auftrag der eFonds Solutions AG, +49-89-579494-3417


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


Mime
View raw message