com.vaadin.data.Item - java examples

Here are the examples of the java api com.vaadin.data.Item taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

102 Examples 7

19 View Complete Implementation : DistributionSetTypeSoftwareModuleSelectLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
protected static boolean isOptionalModuleType(final Item item) {
    return !isMandatoryModuleType(item);
}

19 View Complete Implementation : TargetFilterQueryButtons.java
Copyright Eclipse Public License 1.0
Author : eclipse
private Button addGeneratedCell(final Object itemId) {
    final Item item = gereplacedem(itemId);
    final Long id = (Long) item.gereplacedemProperty(SPUILabelDefinitions.VAR_ID).getValue();
    final String name = (String) item.gereplacedemProperty(SPUILabelDefinitions.VAR_NAME).getValue();
    final Button typeButton = createFilterButton(id, name, itemId);
    if (isClickedByDefault(id)) {
        customTargetTagFilterButtonClick.setDefaultButtonClicked(typeButton);
    }
    return typeButton;
}

19 View Complete Implementation : SwModuleTable.java
Copyright Eclipse Public License 1.0
Author : eclipse
private String createTableStyle(final Object itemId, final Object propertyId) {
    if (null == propertyId) {
        final Item item = gereplacedem(itemId);
        final boolean isreplacedigned = (boolean) item.gereplacedemProperty(SPUILabelDefinitions.VAR_replacedIGNED).getValue();
        final Long typeId = (Long) item.gereplacedemProperty(SPUILabelDefinitions.VAR_SOFT_TYPE_ID).getValue();
        String color = (String) item.gereplacedemProperty(SPUILabelDefinitions.VAR_COLOR).getValue();
        if (color == null) {
            // In case the color is null apply default green color. eg:- for
            // types ECL OS, ECL
            // Application etc.,
            color = SPUIDefinitions.DEFAULT_COLOR;
        }
        return getTableStyle(typeId, isreplacedigned, color);
    }
    return null;
}

19 View Complete Implementation : ContainerDataSource.java
Copyright Apache License 2.0
Author : chelu
/**
 * {@inheritDoc}
 */
public Property getContainerProperty(Object itemId, Object propertyId) {
    Item item = gereplacedem(itemId);
    return item != null ? item.gereplacedemProperty(propertyId) : null;
}

19 View Complete Implementation : SQLPIPConfigurationComponent.java
Copyright MIT License
Author : att
protected void initializeSQLDriverCombo() {
    // 
    // GUI properties
    // 
    this.comboBoxSQLDriver.setImmediate(true);
    this.comboBoxSQLDriver.setRequired(true);
    this.comboBoxConnectionType.setRequiredError("You must select a JDBC Driver");
    this.comboBoxSQLDriver.setInputPrompt("Eg. com.mysql.jdbc.Driver");
    // 
    // Add some common driver values. These are the drivers we have tested with so far.
    // 
    for (String driver : SQL_DRIVERS) {
        this.comboBoxSQLDriver.addItem(driver);
    }
    // 
    // Setup the default selection
    // 
    PIPConfigParam param = (PIPConfigParam) this.comboBoxSQLDriver.getData();
    if (param != null) {
        this.comboBoxSQLDriver.setValue(param.getParamValue());
        // 
        // Check if its there (the value could be something other than what we
        // have setup in our list of defaults.)
        // 
        boolean bFound = false;
        for (Object id : this.comboBoxSQLDriver.gereplacedemIds()) {
            Item item = this.comboBoxSQLDriver.gereplacedem(id);
            if (item.toString().equals(param.getParamValue())) {
                bFound = true;
                break;
            }
        }
        if (!bFound) {
            // 
            // It's not one of our defaults, no problem. Add it in.
            // 
            this.comboBoxSQLDriver.addItem(param.getParamValue());
            this.comboBoxSQLDriver.setValue(param.getParamValue());
        }
    }
    // 
    // Allow new items
    // 
    this.comboBoxSQLDriver.setNewItemsAllowed(true);
    // 
    // Respond to selection changes
    // 
    this.comboBoxSQLDriver.addValueChangeListener(new ValueChangeListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void valueChange(ValueChangeEvent event) {
            PIPConfigParam param = (PIPConfigParam) self.comboBoxSQLDriver.getData();
            if (param == null) {
                param = new PIPConfigParam(SQL_DRIVER, self.comboBoxSQLDriver.getValue().toString());
                self.enreplacedy.getEnreplacedy().addPipconfigParam(param);
                self.comboBoxSQLDriver.setData(param);
            }
            // 
            // Was something unselected?
            // 
            if (self.comboBoxSQLDriver.getValue() == null) {
                param.setParamValue(null);
            } else {
                param.setParamValue(self.comboBoxSQLDriver.getValue().toString());
                // 
                // See if we should pre-populate the driver URL
                // 
                self.setupDriverURL(self.comboBoxSQLDriver.getValue().toString());
            }
            // 
            // Fire
            // 
            self.fireFormChangedEvent();
        }
    });
}

19 View Complete Implementation : PkItemIdStrategy.java
Copyright Apache License 2.0
Author : chelu
/**
 * @param item
 * @return
 */
private Serializable getIdByItem(Item item) {
    return (Serializable) item.gereplacedemProperty(identifierPropertyName).getValue();
}

19 View Complete Implementation : TargetTable.java
Copyright Eclipse Public License 1.0
Author : eclipse
private String createTargetTableStyle(final Object itemId, final Object propertyId) {
    if (propertyId == null) {
        final Item item = gereplacedem(itemId);
        final Long replacedignedDistributionSetId = (Long) item.gereplacedemProperty(SPUILabelDefinitions.replacedIGNED_DISTRIBUTION_ID).getValue();
        final Long installedDistributionSetId = (Long) item.gereplacedemProperty(SPUILabelDefinitions.INSTALLED_DISTRIBUTION_ID).getValue();
        return getTargetTableStyle(replacedignedDistributionSetId, installedDistributionSetId);
    }
    return null;
}

19 View Complete Implementation : PkItemIdStrategy.java
Copyright Apache License 2.0
Author : chelu
/**
 * {@inheritDoc}
 */
public Object lasreplacedemId() {
    Item item = containerDataSource.gereplacedemByIndex(containerDataSource.size() - 1);
    return item != null ? item.gereplacedemProperty(identifierPropertyName) : null;
}

19 View Complete Implementation : CRUDBaseView.java
Copyright Apache License 2.0
Author : opensecuritycontroller
private void setChildItem(Item childItem) {
}

19 View Complete Implementation : IndexedItemIdStrategy.java
Copyright Apache License 2.0
Author : chelu
/**
 * {@inheritDoc}
 */
public void itemLoaded(int index, Item item) {
}

19 View Complete Implementation : PkItemIdStrategy.java
Copyright Apache License 2.0
Author : chelu
/**
 * {@inheritDoc}
 */
public Object getIdByIndex(int index) {
    Item item = containerDataSource.gereplacedemByIndex(index);
    return item != null ? getIdByItem(item) : null;
}

19 View Complete Implementation : ContainerCSVExport.java
Copyright GNU General Public License v3.0
Author : rlsutton1
/**
 * @param item
 * @param columnId
 *            - as specified in the map returned from
 *            getExtraColumnHeadersAndPropertyIds()
 * @return
 */
protected String getValueForExtraColumn(Item item, Object columnId) {
    return null;
}

19 View Complete Implementation : EntityItemIdStrategy.java
Copyright Apache License 2.0
Author : chelu
/**
 * {@inheritDoc}
 */
public void itemLoaded(int index, Item item) {
// TODO Auto-generated method stub
}

18 View Complete Implementation : PkItemIdStrategy.java
Copyright Apache License 2.0
Author : chelu
public Serializable getKey(Item item) {
    return item.gereplacedemProperty(identifierPropertyName);
}

18 View Complete Implementation : TableComponent.java
Copyright Apache License 2.0
Author : chelu
/**
 * Get the wrapped bean from item calling to getMethod by  reflection.
 * @param item item
 * @return wrapped bean
 */
@SuppressWarnings("unchecked")
protected T getBean(Item item) {
    return (T) ItemUtils.getBean(item);
}

18 View Complete Implementation : SoftwareModuleTable.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void updateSoftwareModuleInTable(final SoftwareModule editedSm) {
    final Item item = getContainerDataSource().gereplacedem(editedSm.getId());
    updateEnreplacedy(editedSm, item);
}

18 View Complete Implementation : AbstractFilterButtons.java
Copyright Eclipse Public License 1.0
Author : eclipse
private DragAndDropWrapper addGeneratedCell(final Object itemId) {
    final Item item = gereplacedem(itemId);
    final Long id = (Long) item.gereplacedemProperty(SPUILabelDefinitions.VAR_ID).getValue();
    final String name = (String) item.gereplacedemProperty(SPUILabelDefinitions.VAR_NAME).getValue();
    final String desc = (String) item.gereplacedemProperty(SPUILabelDefinitions.VAR_DESC).getValue() != null ? item.gereplacedemProperty(SPUILabelDefinitions.VAR_DESC).getValue().toString() : null;
    final String color = (String) item.gereplacedemProperty(SPUILabelDefinitions.VAR_COLOR).getValue() != null ? item.gereplacedemProperty(SPUILabelDefinitions.VAR_COLOR).getValue().toString() : DEFAULT_GREEN;
    final Button typeButton = createFilterButton(id, name, desc, color, itemId);
    typeButton.addClickListener(filterButtonClickBehaviour::processFilterButtonClick);
    if ((NO_TAG_BUTTON_ID.equals(typeButton.getData()) && isNoTagStateSelected()) || (id != null && isClickedByDefault(name))) {
        filterButtonClickBehaviour.setDefaultClickedButton(typeButton);
    }
    return createDragAndDropWrapper(typeButton, name, id);
}

18 View Complete Implementation : DistributionSetTypeSoftwareModuleSelectLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
protected static boolean isMandatoryModuleType(final Item item) {
    final CheckBox mandatoryCheckBox = (CheckBox) item.gereplacedemProperty(getDistTypeMandatory()).getValue();
    return mandatoryCheckBox.getValue();
}

18 View Complete Implementation : DistributionSetTable.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void addTableStyleGenerator() {
    setCellStyleGenerator((source, itemId, propertyId) -> {
        if (propertyId == null) {
            // Styling for row
            final Item item = gereplacedem(itemId);
            final Boolean isComplete = (Boolean) item.gereplacedemProperty(SPUILabelDefinitions.VAR_IS_DISTRIBUTION_COMPLETE).getValue();
            if (!isComplete) {
                return SPUIDefinitions.DISABLE_DISTRIBUTION;
            }
            return null;
        } else {
            return null;
        }
    });
}

18 View Complete Implementation : TargetFilterTable.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void onClickOfDistributionSetButton(final ClickEvent event) {
    final Item item = (Item) ((Button) event.getComponent()).getData();
    final Long tfqId = (Long) item.gereplacedemProperty(SPUILabelDefinitions.VAR_ID).getValue();
    if (permChecker.hasReadRepositoryPermission()) {
        dsSelectWindow.showForTargetFilter(tfqId);
    } else {
        notification.displayValidationError(i18n.getMessage("message.permission.insufficient", SpPermission.READ_REPOSITORY));
    }
}

18 View Complete Implementation : RolloutListGrid.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void pauseRollout(final Long rolloutId) {
    final Item row = getContainerDataSource().gereplacedem(rolloutId);
    final RolloutStatus rolloutStatus = (RolloutStatus) row.gereplacedemProperty(SPUILabelDefinitions.VAR_STATUS).getValue();
    if (RolloutStatus.RUNNING != rolloutStatus) {
        return;
    }
    final String rolloutName = (String) row.gereplacedemProperty(SPUILabelDefinitions.VAR_NAME).getValue();
    rolloutManagement.pauseRollout(rolloutId);
    uiNotification.displaySuccess(i18n.getMessage("message.rollout.paused", rolloutName));
}

18 View Complete Implementation : ValidatingFieldGroup.java
Copyright GNU General Public License v3.0
Author : rlsutton1
@Override
public void sereplacedemDataSource(Item itemDataSource) {
    groupIsDirty = false;
    if (dirtyListener != null) {
        dirtyListener.fieldGroupIsDirty(false);
    }
    super.sereplacedemDataSource(itemDataSource);
}

18 View Complete Implementation : PkItemIdStrategy.java
Copyright Apache License 2.0
Author : chelu
/**
 * {@inheritDoc}
 */
public void itemLoaded(int index, Item item) {
    indexes.put(getIdByItem(item), index);
}

18 View Complete Implementation : ContactFormPresenter.java
Copyright The Unlicense
Author : rolandkrueger
public void editContacreplacedem(Item contacreplacedem) {
    // Wenn es lokale Änderungen gibt, kann kein neues Item bearbeitet
    // werden
    if (mustAbortWithUnsavedChanges()) {
        return;
    }
    contactFieldGroup.sereplacedemDataSource(contacreplacedem);
    isNewContact = false;
}

18 View Complete Implementation : PIPParameterComponent.java
Copyright Apache License 2.0
Author : apache
protected void cloneParameter(Object target) {
    if (target == null) {
        logger.error("null target sent to clone method");
        return;
    }
    Item item;
    if (target instanceof PIPConfigParam && this.config instanceof PIPConfiguration) {
        PIPConfigParam param = new PIPConfigParam((PIPConfigParam) target);
        ((PIPConfiguration) this.config).addPipconfigParam(param);
        item = this.tableParameters.addItem(new BeanItem<PIPConfigParam>(param));
    } else if (target instanceof PIPResolverParam && this.config instanceof PIPResolver) {
        PIPResolverParam param = new PIPResolverParam((PIPResolverParam) target);
        ((PIPResolver) this.config).addPipresolverParam(param);
        item = this.tableParameters.addItem(new BeanItem<PIPResolverParam>(param));
    } else {
        throw new IllegalArgumentException("Unsupported param and config combination.");
    }
    if (item == null) {
        logger.error("Failed to add parameter to table: " + target);
    } else {
        this.tableParameters.select(target);
    }
}

18 View Complete Implementation : ListBeanContainer.java
Copyright Apache License 2.0
Author : chelu
@Override
public Item addItem(Object itemId) throws UnsupportedOperationException {
    Item item = createItem(itemId);
    if (this.items.add(item)) {
        fireItemSetChange();
        return item;
    }
    return null;
}

17 View Complete Implementation : DistributionSetTable.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void updateDistributionInTable(final DistributionSet editedDs) {
    final Item item = getContainerDataSource().gereplacedem(editedDs.getId());
    updateEnreplacedy(editedDs, item);
}

17 View Complete Implementation : SwMetadataPopupLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
@Override
protected Item popualateKeyValue(final Object metadataCompositeKey) {
    final Item item = super.popualateKeyValue(metadataCompositeKey);
    if (item != null) {
        targetVisibleField.setValue((Boolean) item.gereplacedemProperty(TARGET_VISIBLE).getValue());
        if (hasUpdatePermission()) {
            targetVisibleField.setEnabled(true);
        }
    }
    return item;
}

17 View Complete Implementation : SwMetadataPopupLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
@Override
protected Item updateItemInGrid(final String key) {
    final Item item = super.updateItemInGrid(key);
    item.gereplacedemProperty(TARGET_VISIBLE).setValue(targetVisibleField.getValue());
    return item;
}

17 View Complete Implementation : DistributionTable.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void updateDistributionInTable(final DistributionSet editedDs) {
    final Item item = getContainerDataSource().gereplacedem(editedDs.getId());
    if (item == null) {
        return;
    }
    updateEnreplacedy(editedDs, item);
}

17 View Complete Implementation : RolloutListGrid.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void startOrResumeRollout(final Long rolloutId) {
    final Item row = getContainerDataSource().gereplacedem(rolloutId);
    final RolloutStatus rolloutStatus = (RolloutStatus) row.gereplacedemProperty(SPUILabelDefinitions.VAR_STATUS).getValue();
    final String rolloutName = (String) row.gereplacedemProperty(SPUILabelDefinitions.VAR_NAME).getValue();
    if (RolloutStatus.READY == rolloutStatus) {
        rolloutManagement.start(rolloutId);
        uiNotification.displaySuccess(i18n.getMessage("message.rollout.started", rolloutName));
        return;
    }
    if (RolloutStatus.PAUSED == rolloutStatus) {
        rolloutManagement.resumeRollout(rolloutId);
        uiNotification.displaySuccess(i18n.getMessage("message.rollout.resumed", rolloutName));
    }
}

17 View Complete Implementation : PluginsLayout.java
Copyright Apache License 2.0
Author : opensecuritycontroller
private void updateTable(PluginEvent event) {
    PluginApi plugin = event.getPlugin();
    switch(event.getType()) {
        case ADDING:
            Item addingItem = this.plugins.addItem(plugin);
            if (addingItem != null) {
                updateItem(addingItem, plugin);
            }
            break;
        case MODIFIED:
            Item modifyingItem = this.plugins.gereplacedem(plugin);
            if (modifyingItem == null) {
                modifyingItem = this.plugins.addItem(plugin);
            }
            if (modifyingItem != null) {
                updateItem(modifyingItem, plugin);
            }
            break;
        case REMOVED:
            this.plugins.removeItem(plugin);
            break;
        default:
            this.log.error("Unknown plugin event type: " + event.getType());
            break;
    }
}

17 View Complete Implementation : FunctionSelectionWindow.java
Copyright Apache License 2.0
Author : apache
protected void initializeFunctions() {
    // 
    // Setup data source. Make sure there are no current filters
    // 
    FunctionSelectionWindow.highOrderFunctions.removeAllContainerFilters();
    this.tableFunctions.setContainerDataSource(FunctionSelectionWindow.highOrderFunctions);
    // 
    // Initialize GUI properties
    // 
    this.tableFunctions.setImmediate(true);
    this.tableFunctions.setNullSelectionAllowed(false);
    this.tableFunctions.setRequired(true);
    this.tableFunctions.setRequiredError("Please select a function.");
    this.tableFunctions.setSelectable(true);
    this.tableFunctions.setPageLength(15);
    this.tableFunctions.setVisibleColumns(new Object[] { PROPERTY_SHORTNAME, PROPERTY_XACMLID });
    this.tableFunctions.setColumnHeaders(new String[] { "Short Function Name", "Xacml ID" });
    // 
    // Respond to selection events
    // 
    this.tableFunctions.addValueChangeListener(new ValueChangeListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void valueChange(ValueChangeEvent event) {
            Object id = self.tableFunctions.getValue();
            if (id != null) {
                Item item = FunctionSelectionWindow.highOrderFunctions.gereplacedem(id);
                if (item == null) {
                    return;
                }
                Property<?> property = item.gereplacedemProperty(PROPERTY_XACMLID);
                if (property == null) {
                    return;
                }
                selectedFunction = property.getValue().toString();
                self.buttonSave.setEnabled(true);
            } else {
                self.buttonSave.setEnabled(false);
            }
        }
    });
    // 
    // Respond to double-click events
    // 
    this.tableFunctions.addItemClickListener(new ItemClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void itemClick(ItemClickEvent event) {
            if (event.isDoubleClick()) {
                self.doSave();
            }
        }
    });
    // 
    // Setup the default selection
    // 
    this.buttonSave.setEnabled(false);
    if (this.defaultFunctionID != null) {
        for (Object id : FunctionSelectionWindow.highOrderFunctions.gereplacedemIds()) {
            Item item = FunctionSelectionWindow.highOrderFunctions.gereplacedem(id);
            if (item != null) {
                Property<?> property = item.gereplacedemProperty(PROPERTY_XACMLID);
                if (property != null && property.getValue().toString().equals(this.defaultFunctionID)) {
                    this.tableFunctions.select(id);
                    break;
                }
            }
        }
    }
}

17 View Complete Implementation : MatchEditorWindow.java
Copyright Apache License 2.0
Author : apache
protected void initializeFunctions() {
    // 
    // Setup datasource and GUI properties
    // 
    this.tableFunctions.setContainerDataSource(MatchEditorWindow.matchFunctions);
    this.tableFunctions.setImmediate(true);
    this.tableFunctions.setNullSelectionAllowed(false);
    this.tableFunctions.setRequired(true);
    this.tableFunctions.setRequiredError("Please select a function.");
    this.tableFunctions.setSelectable(true);
    this.tableFunctions.setPageLength(15);
    this.tableFunctions.setVisibleColumns(PROPERTY_SHORTNAME, PROPERTY_XACMLID);
    this.tableFunctions.setColumnHeaders(new String[] { "Short Function Name", "Xacml ID" });
    // 
    // Filter out functions where ARG2 is the given datatype. NOTE: The
    // AttributeDesignator/AttributeSelector is the 2nd argument.
    // 
    MatchEditorWindow.matchFunctions.removeAllContainerFilters();
    MatchEditorWindow.matchFunctions.addContainerFilter(new Compare.Equal(PROPERTY_ARG2_DATATYPE, this.datatype.getId()));
    // 
    // Respond to selection events
    // 
    this.tableFunctions.addValueChangeListener(new ValueChangeListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void valueChange(ValueChangeEvent event) {
            Object id = self.tableFunctions.getValue();
            if (id != null) {
                Item item = MatchEditorWindow.matchFunctions.gereplacedem(id);
                if (item == null) {
                    return;
                }
                Property<?> property = item.gereplacedemProperty(PROPERTY_XACMLID);
                if (property == null) {
                    return;
                }
                self.match.setMatchId(property.getValue().toString());
                self.buttonSave.setEnabled(true);
            } else {
                self.buttonSave.setEnabled(false);
            }
        }
    });
    // 
    // Respond to double-click events
    // 
    this.tableFunctions.addItemClickListener(new ItemClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void itemClick(ItemClickEvent event) {
            if (event.isDoubleClick()) {
                self.doSave();
            }
        }
    });
    // 
    // Default selection
    // 
    this.buttonSave.setEnabled(false);
    if (this.match.getMatchId() != null) {
        for (Object id : MatchEditorWindow.matchFunctions.gereplacedemIds()) {
            Item item = MatchEditorWindow.matchFunctions.gereplacedem(id);
            if (item != null) {
                Property<?> property = item.gereplacedemProperty(PROPERTY_XACMLID);
                if (property != null && property.getValue().toString().equals(this.match.getMatchId())) {
                    this.tableFunctions.select(id);
                    break;
                }
            }
        }
    }
}

17 View Complete Implementation : AbstractMetadataPopupLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
protected Item addItemToGrid(final M metaData) {
    final IndexedContainer metadataContainer = (IndexedContainer) metaDataGrid.getContainerDataSource();
    final Item item = metadataContainer.addItem(metaData.getKey());
    item.gereplacedemProperty(VALUE).setValue(metaData.getValue());
    item.gereplacedemProperty(KEY).setValue(metaData.getKey());
    return item;
}

17 View Complete Implementation : TagAssignementComboBox.java
Copyright Eclipse Public License 1.0
Author : eclipse
/**
 * Adds an replacedignable Tag to the combobox.
 *
 * @param tagData
 *            the data of the Tag
 */
void addreplacedignableTag(final TagData tagData) {
    final Item item = allreplacedignableTags.addItem(tagData.getName());
    if (item == null) {
        return;
    }
    item.gereplacedemProperty(NAME_PROPERTY).setValue(tagData.getName());
    item.gereplacedemProperty(COLOR_PROPERTY).setValue(tagData.getColor());
}

17 View Complete Implementation : DistributionSetTypeSoftwareModuleSelectLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
@SuppressWarnings("unchecked")
private void addSourceTableData(final Long selectedId) {
    if (sourceTableContainer != null) {
        Item saveTblitem;
        saveTblitem = sourceTableContainer.addItem(selectedId);
        saveTblitem.gereplacedemProperty(DIST_TYPE_NAME).setValue(selectedTable.getContainerDataSource().gereplacedem(selectedId).gereplacedemProperty(DIST_TYPE_NAME).getValue());
        saveTblitem.gereplacedemProperty(DIST_TYPE_DESCRIPTION).setValue(selectedTable.getContainerDataSource().gereplacedem(selectedId).gereplacedemProperty(DIST_TYPE_DESCRIPTION).getValue());
    }
}

16 View Complete Implementation : AddressSelectViewImplEx.java
Copyright Apache License 2.0
Author : akquinet
@SuppressWarnings({ "unchecked", "rawtypes" })
@Override
public Address getAddressSelection() {
    Item item = container.gereplacedem(((Property) addressTable).getValue());
    return ((BeanItem<Address>) item).getBean();
}

16 View Complete Implementation : FunctionSelectionWindow.java
Copyright MIT License
Author : att
protected void initializeFunctions() {
    // 
    // Setup data source. Make sure there are no current filters
    // 
    FunctionSelectionWindow.highOrderFunctions.removeAllContainerFilters();
    this.tableFunctions.setContainerDataSource(FunctionSelectionWindow.highOrderFunctions);
    // 
    // Initialize GUI properties
    // 
    this.tableFunctions.setImmediate(true);
    this.tableFunctions.setNullSelectionAllowed(false);
    this.tableFunctions.setRequired(true);
    this.tableFunctions.setRequiredError("Please select a function.");
    this.tableFunctions.setSelectable(true);
    this.tableFunctions.setPageLength(15);
    this.tableFunctions.setVisibleColumns(new Object[] { PROPERTY_SHORTNAME, PROPERTY_XACMLID });
    this.tableFunctions.setColumnHeaders(new String[] { "Short Function Name", "Xacml ID" });
    // 
    // Respond to selection events
    // 
    this.tableFunctions.addValueChangeListener(new ValueChangeListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void valueChange(ValueChangeEvent event) {
            Object id = self.tableFunctions.getValue();
            if (id != null) {
                Item item = FunctionSelectionWindow.highOrderFunctions.gereplacedem(id);
                if (item == null) {
                    return;
                }
                Property<?> property = item.gereplacedemProperty(PROPERTY_XACMLID);
                if (property == null) {
                    return;
                }
                selectedFunction = property.getValue().toString();
                self.buttonSave.setEnabled(true);
            } else {
                self.buttonSave.setEnabled(false);
            }
        }
    });
    // 
    // Respond to double-click events
    // 
    this.tableFunctions.addItemClickListener(new ItemClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void itemClick(ItemClickEvent event) {
            if (event.isDoubleClick()) {
                self.doSave();
            }
        }
    });
    // 
    // Setup the default selection
    // 
    this.buttonSave.setEnabled(false);
    if (this.defaultFunctionID != null) {
        for (Object id : FunctionSelectionWindow.highOrderFunctions.gereplacedemIds()) {
            Item item = FunctionSelectionWindow.highOrderFunctions.gereplacedem(id);
            if (item != null) {
                Property<?> property = item.gereplacedemProperty(PROPERTY_XACMLID);
                if (property != null) {
                    if (property.getValue().toString().equals(this.defaultFunctionID)) {
                        this.tableFunctions.select(id);
                        break;
                    }
                }
            }
        }
    }
}

16 View Complete Implementation : MatchEditorWindow.java
Copyright MIT License
Author : att
protected void initializeFunctions() {
    // 
    // Setup datasource and GUI properties
    // 
    this.tableFunctions.setContainerDataSource(MatchEditorWindow.matchFunctions);
    this.tableFunctions.setImmediate(true);
    this.tableFunctions.setNullSelectionAllowed(false);
    this.tableFunctions.setRequired(true);
    this.tableFunctions.setRequiredError("Please select a function.");
    this.tableFunctions.setSelectable(true);
    this.tableFunctions.setPageLength(15);
    this.tableFunctions.setVisibleColumns(PROPERTY_SHORTNAME, PROPERTY_XACMLID);
    this.tableFunctions.setColumnHeaders(new String[] { "Short Function Name", "Xacml ID" });
    // 
    // Filter out functions where ARG2 is the given datatype. NOTE: The
    // AttributeDesignator/AttributeSelector is the 2nd argument.
    // 
    MatchEditorWindow.matchFunctions.removeAllContainerFilters();
    MatchEditorWindow.matchFunctions.addContainerFilter(new Compare.Equal(PROPERTY_ARG2_DATATYPE, this.datatype.getId()));
    // 
    // Respond to selection events
    // 
    this.tableFunctions.addValueChangeListener(new ValueChangeListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void valueChange(ValueChangeEvent event) {
            Object id = self.tableFunctions.getValue();
            if (id != null) {
                Item item = MatchEditorWindow.matchFunctions.gereplacedem(id);
                if (item == null) {
                    return;
                }
                Property<?> property = item.gereplacedemProperty(PROPERTY_XACMLID);
                if (property == null) {
                    return;
                }
                self.match.setMatchId(property.getValue().toString());
                self.buttonSave.setEnabled(true);
            } else {
                self.buttonSave.setEnabled(false);
            }
        }
    });
    // 
    // Respond to double-click events
    // 
    this.tableFunctions.addItemClickListener(new ItemClickListener() {

        private static final long serialVersionUID = 1L;

        @Override
        public void itemClick(ItemClickEvent event) {
            if (event.isDoubleClick()) {
                self.doSave();
            }
        }
    });
    // 
    // Default selection
    // 
    this.buttonSave.setEnabled(false);
    if (this.match.getMatchId() != null) {
        for (Object id : MatchEditorWindow.matchFunctions.gereplacedemIds()) {
            Item item = MatchEditorWindow.matchFunctions.gereplacedem(id);
            if (item != null) {
                Property<?> property = item.gereplacedemProperty(PROPERTY_XACMLID);
                if (property != null) {
                    if (property.getValue().toString().equals(this.match.getMatchId())) {
                        this.tableFunctions.select(id);
                        break;
                    }
                }
            }
        }
    }
}

16 View Complete Implementation : ConfigurableFieldFactory.java
Copyright Apache License 2.0
Author : chelu
/**
 * {@inheritDoc}
 */
public Field createField(Item item, Object propertyId, Component uiContext) {
    Clreplaced<Field> clazz = fieldMap.get(propertyId);
    if (clazz != null) {
        try {
            return BeanUtils.instantiate(clazz);
        } catch (BeanInstantiationException bie) {
            log.error(bie);
        }
    }
    return null;
}

16 View Complete Implementation : AbstractMetadataPopupLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void onDelete(final RendererClickEvent event) {
    final Item item = metaDataGrid.getContainerDataSource().gereplacedem(event.gereplacedemId());
    final String key = (String) item.gereplacedemProperty(KEY).getValue();
    final ConfirmationDialog confirmDialog = new ConfirmationDialog(i18n.getMessage("caption.enreplacedy.delete.action.confirmbox"), i18n.getMessage("message.confirm.delete.metadata", key), i18n.getMessage(UIMessageIdProvider.BUTTON_OK), i18n.getMessage(UIMessageIdProvider.BUTTON_CANCEL), ok -> {
        if (ok) {
            handleOkDeleteMetadata(event, key);
        }
    });
    UI.getCurrent().addWindow(confirmDialog.getWindow());
    confirmDialog.getWindow().bringToFront();
}

16 View Complete Implementation : AbstractMetadataDetailsLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
protected void setMetadataProperties(final MetaData dsMetadata) {
    final Item item = getContainerDataSource().addItem(dsMetadata.getKey());
    item.gereplacedemProperty(METADATA_KEY).setValue(dsMetadata.getKey());
}

16 View Complete Implementation : DistributionSetTypeSoftwareModuleSelectLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
@SuppressWarnings("unchecked")
private void getSelectedTableItemData(final Long id) {
    Item saveTblitem;
    if (selectedTableContainer != null) {
        saveTblitem = selectedTableContainer.addItem(id);
        saveTblitem.gereplacedemProperty(DIST_TYPE_NAME).setValue(sourceTable.getContainerDataSource().gereplacedem(id).gereplacedemProperty(DIST_TYPE_NAME).getValue());
        final CheckBox mandatoryCheckBox = new CheckBox();
        saveTblitem.gereplacedemProperty(DIST_TYPE_MANDATORY).setValue(mandatoryCheckBox);
        saveTblitem.gereplacedemProperty(DIST_TYPE_DESCRIPTION).setValue(sourceTable.getContainerDataSource().gereplacedem(id).gereplacedemProperty(DIST_TYPE_DESCRIPTION).getValue());
    }
}

16 View Complete Implementation : SwMetadataPopupLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
@Override
protected Item addItemToGrid(final SoftwareModuleMetadata metaData) {
    final Item item = super.addItemToGrid(metaData);
    item.gereplacedemProperty(TARGET_VISIBLE).setValue(metaData.isTargetVisible());
    return item;
}

16 View Complete Implementation : TargetFilterTable.java
Copyright Eclipse Public License 1.0
Author : eclipse
private Button getDeleteButton(final Long itemId) {
    final Item row = gereplacedem(itemId);
    final String tfName = (String) row.gereplacedemProperty(SPUILabelDefinitions.NAME).getValue();
    final Button deleteIcon = SPUIComponentProvider.getButton(getDeleteIconId(tfName), "", i18n.getMessage(UIMessageIdProvider.TOOLTIP_DELETE_CUSTOM_FILTER), ValoTheme.BUTTON_TINY + " " + "blueicon", true, FontAwesome.TRASH_O, SPUIButtonStyleNoBorder.clreplaced);
    deleteIcon.setData(itemId);
    deleteIcon.addClickListener(this::onDelete);
    return deleteIcon;
}

16 View Complete Implementation : DistributionTable.java
Copyright Eclipse Public License 1.0
Author : eclipse
private void replacedignTargetToDs(final Item item, final List<Target> targets) {
    if (item == null || item.gereplacedemProperty("id") == null) {
        return;
    }
    if (targets.isEmpty()) {
        getNotification().displayWarning(getI18n().getMessage(TARGETS_NOT_EXISTS));
        return;
    }
    final Long distId = (Long) item.gereplacedemProperty("id").getValue();
    selectDroppedEnreplacedies(distId);
    final Optional<DistributionSet> distributionSet = distributionSetManagement.get(distId);
    if (!distributionSet.isPresent()) {
        getNotification().displayWarning(getI18n().getMessage(DISTRIBUTIONSET_NOT_EXISTS));
        return;
    }
    openConfirmationWindowForreplacedignment(distributionSet.get(), targets);
}

16 View Complete Implementation : AddUpdateRolloutWindowLayout.java
Copyright Eclipse Public License 1.0
Author : eclipse
private String getTargetFilterQuery() {
    if (StringUtils.isEmpty(targetFilterQueryCombo.getValue())) {
        return null;
    }
    final Item filterItem = targetFilterQueryCombo.getContainerDataSource().gereplacedem(targetFilterQueryCombo.getValue());
    return (String) filterItem.gereplacedemProperty("query").getValue();
}

16 View Complete Implementation : ContainerCSVExport.java
Copyright GNU General Public License v3.0
Author : rlsutton1
private void writeRow(CSVWriter writer, Table table, Object id, Set<Object> properties) {
    Item item = table.gereplacedem(id);
    String[] values = new String[properties.size() + extraColumnHeadersAndPropertyIds.size()];
    int i = 0;
    for (Object propertyId : properties) {
        @SuppressWarnings("rawtypes")
        final Property itemProperty = item.gereplacedemProperty(propertyId);
        if (itemProperty != null && itemProperty.getValue() != null) {
            ColumnGenerator generator = table.getColumnGenerator(propertyId);
            // added handling for generated Boolean columns, - just using
            // the default property toString()
            if (generator != null && itemProperty.getType() != Boolean.clreplaced) {
                Object value = generator.generateCell(table, id, propertyId);
                if (value instanceof Label) {
                    value = new HtmlToPlainText().getPlainText(Jsoup.parse(((Label) value).getValue()));
                }
                if (value instanceof AbstractLayout) {
                    value = new HtmlToPlainText().getPlainText(Jsoup.parse(itemProperty.getValue().toString()));
                }
                if (value instanceof Link) {
                    value = new HtmlToPlainText().getPlainText(Jsoup.parse(itemProperty.getValue().toString()));
                }
                if (value != null) {
                    values[i++] = value.toString();
                }
            } else {
                values[i++] = itemProperty.getValue().toString();
            }
        } else {
            ColumnGenerator generator = table.getColumnGenerator(propertyId);
            if (generator != null) {
                Object value = generator.generateCell(table, id, propertyId);
                if (value != null) {
                    if (value instanceof ClickableLabel) {
                        value = new HtmlToPlainText().getPlainText(Jsoup.parse(((ClickableLabel) value).getValue()));
                    }
                    if (value instanceof Label) {
                        value = new HtmlToPlainText().getPlainText(Jsoup.parse(((Label) value).getValue()));
                    // value = ((Label) value).getValue();
                    }
                    if (value instanceof AbstractLayout) {
                        // if you want your generated field to be exported,
                        // set a string using setData() on the layout.
                        if (((AbstractLayout) value).getData() instanceof ContainerCSVExportData) {
                            value = ((AbstractLayout) value).getData().toString();
                        } else {
                            value = "";
                        }
                    }
                    if (value instanceof Link) {
                        value = new HtmlToPlainText().getPlainText(Jsoup.parse(((Link) value).getCaption()));
                    }
                }
                if (value == null) {
                    value = "";
                }
                values[i++] = value.toString();
            } else {
                values[i++] = "";
            }
        }
    }
    for (Object columnId : extraColumnHeadersAndPropertyIds.values()) {
        String value = getValueForExtraColumn(item, columnId);
        if (value == null) {
            value = "";
        }
        values[i++] = value;
    }
    writer.writeNext(values);
}

16 View Complete Implementation : PreviewCSV.java
Copyright GNU General Public License v3.0
Author : rlsutton1
private static void addRow(IndexedContainer container, String[] fields, String[] headers) {
    Object itemId = container.addItem();
    Item item = container.gereplacedem(itemId);
    for (int i = 0; i < headers.length; i++) {
        @SuppressWarnings("unchecked")
        Property<String> itemProperty = item.gereplacedemProperty(headers[i]);
        itemProperty.setValue(fields[i]);
    }
}