@Override public void onBrowserEvent(Context context, Element elem, final T object, NativeEvent event) { // The provided row is always the root row, so we need to find the // correct one when a sub row was edited actualIndex = context.getSubIndex(); actualObject = object; if (0 != context.getSubIndex() && object instanceof RowDTO) { actualIndex = context.getSubIndex(); actualObject = (T) ((RowDTO) object).getChild(actualIndex - 1); context = new Context(context.getIndex(), context.getColumn(), actualObject, actualIndex); } ValueUpdater<C> valueUpdater = (getFieldUpdater() == null) ? null : new ValueUpdater<C>() { @Override public void update(C value) { getFieldUpdater().update(actualIndex, object, value); } }; getCell().onBrowserEvent(context, elem, getValue(actualObject), event, valueUpdater); }
Ankit singla
source share