/** * Expands the given item at the given index. Calling this method will have * no effect if the item is already expanded. * * @param item * the item to expand * @param index * the index of the item */ public void expand(T item, Integer index) { doExpand(item, index, true); }
/** * Expands the given item. Calling this method will have no effect if the * item is already expanded or if it has no children. {@code syncAndRefresh} * indicates whether the changes should be synchronised to the client and * the data provider be notified. * * @param item * the item to expand * @param syncAndRefresh * {@code true} if the changes should be synchronised to the * client and the data provider should be notified of the * changes, {@code * false} otherwise. */ public void expand(T item, boolean syncAndRefresh) { Integer index = syncAndRefresh ? mapper.getIndexOf(item).orElse(null) : null; doExpand(item, index, syncAndRefresh); }