pass wodget object to onAdd method