You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by cosmindumy <co...@yahoo.com> on 2013/10/22 16:47:23 UTC

AbstractColumn get row object

Hello,
Maybe is newbie question but I couldn't figure out how to get the object of
a row in a data table in a AbstractColumn.
I want to add a edit button as last cell in the row. 
Here is my code:
List<IColumn&lt;Person>> createTableColumns() {
...
columns.add( new EditColumn (...))
}
May I get the row object when I create the column?
Thanks.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AbstractColumn-get-row-object-tp4661924.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: AbstractColumn get row object

Posted by cosmindumy <co...@yahoo.com>.
Thanks for relies.
I saved the reference in newCellItem.
Cheers.



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AbstractColumn-get-row-object-tp4661924p4661939.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: AbstractColumn get row object

Posted by meduolis <me...@gmail.com>.
If you are using DataTable a a repeater, this thread might help for you:
http://stackoverflow.com/questions/10796342/making-entire-row-of-a-wicket-datable-clickable
<http://stackoverflow.com/questions/10796342/making-entire-row-of-a-wicket-datable-clickable>  

It lets you to make all row click-able. If you want to make single cell
(column) click-able try to override newCellItem instead of newRowItem:
http://wicket.apache.org/apidocs/1.5/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html#newCellItem%28java.lang.String,%20int,%20org.apache.wicket.model.IModel%29
<http://wicket.apache.org/apidocs/1.5/org/apache/wicket/extensions/markup/html/repeater/data/table/DataTable.html#newCellItem%28java.lang.String,%20int,%20org.apache.wicket.model.IModel%29>  



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AbstractColumn-get-row-object-tp4661924p4661926.html
Sent from the Users forum mailing list archive at Nabble.com.

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


Re: AbstractColumn get row object

Posted by Sven Meier <sv...@meiers.net>.
Your column implementation gets a reference to the rowModel in 
#populateItem().

Sven

On 10/22/2013 04:47 PM, cosmindumy wrote:
> Hello,
> Maybe is newbie question but I couldn't figure out how to get the object of
> a row in a data table in a AbstractColumn.
> I want to add a edit button as last cell in the row.
> Here is my code:
> List<IColumn&lt;Person>> createTableColumns() {
> ...
> columns.add( new EditColumn (...))
> }
> May I get the row object when I create the column?
> Thanks.
>
>
>
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/AbstractColumn-get-row-object-tp4661924.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>


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