Search in sources :

Example 11 with ListDataModel

use of javax.faces.model.ListDataModel in project acs-community-packaging by Alfresco.

the class AdminNodeBrowseBean method getStorePermissionMasks.

/**
 * Gets the current node permissions
 *
 * @return the permissions
 */
public DataModel getStorePermissionMasks() {
    if (permissionMasks == null) {
        List<NoStoreMask> noReadPermissions = new ArrayList<NoStoreMask>(1);
        noReadPermissions.add(new NoStoreMask());
        permissionMasks = new ListDataModel(noReadPermissions);
    }
    return permissionMasks;
}
Also used : ArrayList(java.util.ArrayList) ListDataModel(javax.faces.model.ListDataModel)

Example 12 with ListDataModel

use of javax.faces.model.ListDataModel in project acs-community-packaging by Alfresco.

the class AdminNodeBrowseBean method getProperties.

/**
 * Gets the current node properties
 *
 * @return properties
 */
public DataModel getProperties() {
    if (properties == null) {
        Map<QName, Serializable> propertyValues = getNodeService().getProperties(getNodeRef());
        List<Property> nodeProperties = new ArrayList<Property>(propertyValues.size());
        for (Map.Entry<QName, Serializable> property : propertyValues.entrySet()) {
            nodeProperties.add(new Property(property.getKey(), property.getValue()));
        }
        properties = new ListDataModel(nodeProperties);
    }
    return properties;
}
Also used : Serializable(java.io.Serializable) QName(org.alfresco.service.namespace.QName) ArrayList(java.util.ArrayList) Map(java.util.Map) ListDataModel(javax.faces.model.ListDataModel)

Example 13 with ListDataModel

use of javax.faces.model.ListDataModel in project acs-community-packaging by Alfresco.

the class BaseInviteUsersWizard method readObject.

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    this.userRolesDataModel = new ListDataModel();
    this.userRolesDataModel.setWrappedData(this.userGroupRoles);
}
Also used : ListDataModel(javax.faces.model.ListDataModel)

Example 14 with ListDataModel

use of javax.faces.model.ListDataModel in project acs-community-packaging by Alfresco.

the class NewEditionWizard method getDataModel.

/**
 * Util metho which construct a data model with rows passed in parameter
 */
private DataModel getDataModel(Object rows) {
    DataModel translationDataModel = new ListDataModel();
    translationDataModel.setWrappedData(rows);
    return translationDataModel;
}
Also used : ListDataModel(javax.faces.model.ListDataModel) DataModel(javax.faces.model.DataModel) ListDataModel(javax.faces.model.ListDataModel)

Aggregations

ListDataModel (javax.faces.model.ListDataModel)14 ArrayList (java.util.ArrayList)4 ChildAssociationRef (org.alfresco.service.cmr.repository.ChildAssociationRef)4 Map (java.util.Map)2 AssociationRef (org.alfresco.service.cmr.repository.AssociationRef)2 QName (org.alfresco.service.namespace.QName)2 Serializable (java.io.Serializable)1 HashMap (java.util.HashMap)1 DataModel (javax.faces.model.DataModel)1 StoreRef (org.alfresco.service.cmr.repository.StoreRef)1 AccessPermission (org.alfresco.service.cmr.security.AccessPermission)1 AccessStatus (org.alfresco.service.cmr.security.AccessStatus)1