/** * Gets the first focusable field in form. If there are enabled, * non-read-only fields, the first one of them is returned. Otherwise, the * field for the first property (or null if none) is returned. * * @return the Field. */ private Field<?> getFirstFocusableField() { Collection<?> itemPropertyIds = getItemPropertyIds(); if (itemPropertyIds != null && !itemPropertyIds.isEmpty()) { for (Object id : itemPropertyIds) { if (id != null) { Field<?> field = getField(id); if (field.isConnectorEnabled() && !field.isReadOnly()) { return field; } } } // fallback: first field if none of the fields is enabled and // writable Object id = itemPropertyIds.iterator().next(); if (id != null) { return getField(id); } } return null; }
/** * Sets the Tabulator index of this Focusable component. * * @see Component.Focusable#setTabIndex(int) */ @Override public void setTabIndex(int tabIndex) { super.setTabIndex(tabIndex); for (final Object id : getItemPropertyIds()) { getField(id).setTabIndex(tabIndex); } }
Collection<?> visibleItemProperties = f.getItemPropertyIds(); for (Object fieldId : visibleItemProperties) { Field<?> field = f.getField(fieldId); if (equals(field)) {
Field<?> f = getField(property); detachField(f); if (layout instanceof CustomLayout) {