Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.el
Class DocumentModelResolver

java.lang.Object
  extended by javax.el.ELResolver
      extended by javax.el.BeanELResolver
          extended by org.nuxeo.ecm.platform.el.DocumentModelResolver

public class DocumentModelResolver
extends BeanELResolver

Resolves expressions for the DocumentModel framework.

To specify a property on a document mode, the following syntax is available: myDocumentModel.dublincore.title where 'dublincore' is the schema name and 'title' is the field name. It can be used to get or set the document title: <h:outputText value="#{currentDocument.dublincore.title}" /> or <h:inputText value="#{currentDocument.dublincore.title}" />.

Simple document properties are get/set directly: for instance, the above expression will return a String value on get, and set this String on the document for set. Complex properties (maps and lists) are get/set through the Property object controlling their value: on get, sub properties will be resolved at the next iteration, and on set, they will be set on the property instance so the document model is aware of the change.

Author:
Razvan Caraghin, Anahide Tchertchian

Field Summary
 
Fields inherited from class javax.el.ELResolver
RESOLVABLE_AT_DESIGN_TIME, TYPE
 
Constructor Summary
DocumentModelResolver()
           
 
Method Summary
 Class<?> getType(ELContext context, Object base, Object property)
           
 Object getValue(ELContext context, Object base, Object property)
           
 boolean isReadOnly(ELContext context, Object base, Object property)
           
 void setValue(ELContext context, Object base, Object property, Object value)
           
 
Methods inherited from class javax.el.BeanELResolver
getCommonPropertyType, getFeatureDescriptors
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocumentModelResolver

public DocumentModelResolver()
Method Detail

getType

public Class<?> getType(ELContext context,
                        Object base,
                        Object property)
Overrides:
getType in class BeanELResolver

getValue

public Object getValue(ELContext context,
                       Object base,
                       Object property)
Overrides:
getValue in class BeanELResolver

isReadOnly

public boolean isReadOnly(ELContext context,
                          Object base,
                          Object property)
Overrides:
isReadOnly in class BeanELResolver

setValue

public void setValue(ELContext context,
                     Object base,
                     Object property,
                     Object value)
Overrides:
setValue in class BeanELResolver

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.