Hello,

Can't you just make the parent's field final and use : Parent.this.cellItem
?

HTH,

Pierre


On Wed, Jul 15, 2009 at 11:33 AM, Lorenzo Bolzani <[email protected]>wrote:

> Hi all,
> I need to do an ajax refresh of a whole line of a table.
>
> On the left of the table there is a dropdown and when the selection is
> changed the other fields of the table should be refreshed accordingly.
>
> So I have a column where the dropdown is defined and here I add an
> "onchange" behaviour where I should add the entire row to the ajax
> target.
>
> But in the populateItem of ICellPopulator I have no access to the rowItem.
>
> With this hack
>
>         Object repeatingView =
> ReflectionUtil.getPrivateField(cellItem, "parent");
>         return (Item) ReflectionUtil.getPrivateField(repeatingView,
> "parent");
>
> I can reach the rowItem and everything works perfectly.
>
> Now I was looking for a cleaner way to do this.
>
> The item I need is the one that is received from the
> populateItem(Item) of AbstractDataGridView so I could override this
> call super and add the tracking of the current rowItem making it
> available, as a field, in subsequent ICellPopulator.populateItem
> calls. Not very nice anyway.
>
> Do you have any suggestion? Could a getParent method added to cellItem
> to access to the rowItem it belongs to?
>
> Thanks, bye
>
> Lorenzo
> --
> It has to start somewhere, It has to start sometime.
> What better place than here, what better time than now?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Sans amis était le grand maître des mondes,
Eprouvait manque, ce pour quoi il créa les esprits,
Miroirs bienveillants de sa béatitude.
Mais au vrai, il ne trouva aucun égal,
Du calice du royaume total des âmes
Ecume jusqu'à lui l'infinité.

(Schiller, "l'amitié")

Reply via email to