Search in sources :

Example 1 with PropertysetItem

use of com.vaadin.v7.data.util.PropertysetItem in project opencms-core by alkacon.

the class CmsUserDataFormLayout method initFields.

public void initFields(CmsUser user, EditLevel editLevel) {
    m_editLevel = editLevel;
    m_infos = new PropertysetItem();
    for (CmsAccountInfo info : OpenCms.getWorkplaceManager().getAccountInfos()) {
        String value = "";
        if (user != null) {
            value = info.getValue(user);
            if (value == null) {
                value = "";
            }
        }
        m_infos.addItemProperty(info, new ObjectProperty<String>(value));
    }
    m_binder = new FieldGroup(m_infos);
    for (CmsAccountInfo info : OpenCms.getWorkplaceManager().getAccountInfos()) {
        addComponent(buildField(getLabel(info), info));
    }
}
Also used : CmsAccountInfo(org.opencms.workplace.CmsAccountInfo) FieldGroup(com.vaadin.v7.data.fieldgroup.FieldGroup) PropertysetItem(com.vaadin.v7.data.util.PropertysetItem)

Aggregations

FieldGroup (com.vaadin.v7.data.fieldgroup.FieldGroup)1 PropertysetItem (com.vaadin.v7.data.util.PropertysetItem)1 CmsAccountInfo (org.opencms.workplace.CmsAccountInfo)1