@Override public Collection<?> getItemPropertyIds() { Set<Object> wrappedProperties = new LinkedHashSet<Object>( wrappedItem.getItemPropertyIds()); wrappedProperties.removeAll(removedProperties); wrappedProperties.addAll(propertyGenerators.keySet()); return wrappedProperties; }
/** * Remove this contains as a listener for all the properties in the given * {@link Item}. * * @param item * The {@link Item} that contains the properties */ private void removeAllValueChangeListeners(Item item) { for (Object propertyId : item.getItemPropertyIds()) { removeValueChangeListener(item, propertyId); } }
/** * Remove this contains as a listener for all the properties in the given * {@link Item}. * * @param item * The {@link Item} that contains the properties */ private void removeAllValueChangeListeners(Item item) { for (Object propertyId : item.getItemPropertyIds()) { removeValueChangeListener(item, propertyId); } }
/** * Sets the item datasource for the form. * * <p> * Setting item datasource clears any fields, the form might contain and * adds all the properties as fields to the form. * </p> * * @see Item.Viewer#setItemDataSource(Item) */ @Override public void setItemDataSource(Item newDataSource) { setItemDataSource(newDataSource, newDataSource != null ? newDataSource.getItemPropertyIds() : null); }
/** * Returns a collection of all property ids that exist in the item set using * {@link #setItemDataSource(Item)} but have not been bound to fields. * <p> * Will always return an empty collection before an item has been set using * {@link #setItemDataSource(Item)}. * </p> * <p> * No guarantee is given for the order of the property ids * </p> * * @return A collection of property ids that have not been bound to fields */ public Collection<Object> getUnboundPropertyIds() { if (getItemDataSource() == null) { return new ArrayList<Object>(); } List<Object> unboundPropertyIds = new ArrayList<Object>(); unboundPropertyIds.addAll(getItemDataSource().getItemPropertyIds()); unboundPropertyIds.removeAll(propertyIdToField.keySet()); return unboundPropertyIds; }
&& item.getItemPropertyIds().contains(captionProperty)) { basicEvent.setCaption(String.valueOf( item.getItemProperty(captionProperty).getValue())); if (descriptionProperty != null && item.getItemPropertyIds() .contains(descriptionProperty)) { basicEvent.setDescription(String.valueOf( && item.getItemPropertyIds().contains(startDateProperty)) { basicEvent.setStart((Date) item .getItemProperty(startDateProperty).getValue()); && item.getItemPropertyIds().contains(endDateProperty)) { basicEvent.setEnd((Date) item.getItemProperty(endDateProperty) .getValue()); && item.getItemPropertyIds().contains(styleNameProperty)) { basicEvent.setStyleName(String.valueOf( item.getItemProperty(styleNameProperty).getValue())); && item.getItemPropertyIds().contains(allDayProperty)) { basicEvent.setAllDay((Boolean) item .getItemProperty(allDayProperty).getValue());
} else { String minifiedFieldName = minifyFieldName(fieldName); for (Object itemPropertyId : dataSource.getItemPropertyIds()) { if (itemPropertyId instanceof String) { String itemPropertyName = (String) itemPropertyId;
captionChangeNotifiers.add(i); Collection<?> pids = i.getItemPropertyIds(); if (pids != null) { for (Object id : pids) {