Igor - Thanks for the help. I couldn't find a getParent() on the item's class that took a class as a parameter. However, I wrote this, and it worked:
/** * Returns the ancestor (Wicket component hierarchy ancestor, not class hierarchy ancestor) * of the specified component that is an instance of the specified class or one of its subclasses. */ public static Component getAncestor(Component component, Class<? extends Component> ancestorClass) { Component targetClassAncestor = null; for (Component c = component.getParent(); c != null && targetClassAncestor == null; ) { if (c.getClass().isAssignableFrom(ancestorClass)) { targetClassAncestor = c; } else { c = c.getParent(); } } return targetClassAncestor; } igor.vaynberg wrote: > > On Fri, Nov 6, 2009 at 5:29 PM, Keith Bennett <keithrbenn...@gmail.com> > wrote: > > populateitem(item item) { > int col=item.getindex(); > int row=item.getparent(item.class).getindex(); > } > > -igor > -- View this message in context: http://old.nabble.com/DataTable%3A-Can-a-Cell-Know-of-Its-Row-or-Row-Number--tp26241521p26288831.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org