Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.webapp.security
Class UserDisplayConverter

java.lang.Object
  extended by org.nuxeo.ecm.webapp.security.UserDisplayConverter
All Implemented Interfaces:
javax.faces.convert.Converter

public class UserDisplayConverter
extends java.lang.Object
implements javax.faces.convert.Converter

JSF Converter used for rendering, transforming a user id into the user display name.

Sample usage:

 
 lt;h:outputText
  converter="#{userSuggestionActions.userConverter}">
  <f:attribute name="prefixed" value="false" />
  <f:attribute name="userDirectory" value="#{userManager.userDirectoryName}" />
  <f:attribute name="userSchema" value="#{userManager.userSchemaName}" />
  <f:attribute name="firstNameField" value="firstName" />
  <f:attribute name="lastNameField" value="lastName" />
 lt;/h:outputText>
 
 

Author:
Anahide Tchertchian

Constructor Summary
UserDisplayConverter()
           
 
Method Summary
 java.lang.Object getAsObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String value)
          Returns given value (does not do any reverse conversion)
 java.lang.String getAsString(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
          Tries to build the user display name according to information passed as attribute to the component holding the converter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserDisplayConverter

public UserDisplayConverter()
Method Detail

getAsObject

public java.lang.Object getAsObject(javax.faces.context.FacesContext context,
                                    javax.faces.component.UIComponent component,
                                    java.lang.String value)
Returns given value (does not do any reverse conversion)

Specified by:
getAsObject in interface javax.faces.convert.Converter

getAsString

public java.lang.String getAsString(javax.faces.context.FacesContext context,
                                    javax.faces.component.UIComponent component,
                                    java.lang.Object value)
Tries to build the user display name according to information passed as attribute to the component holding the converter.

Handled attributes are:

Specified by:
getAsString in interface javax.faces.convert.Converter

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.