org.alfresco.web.ui.repo.component
Class UILanguageSelector

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.UIInput
                  extended by javax.faces.component.UISelectOne
                      extended by org.alfresco.web.ui.repo.component.UILanguageSelector
All Implemented Interfaces:
javax.faces.component.EditableValueHolder, javax.faces.component.StateHolder, javax.faces.component.ValueHolder

public class UILanguageSelector
extends javax.faces.component.UISelectOne

Component that holds a list of languages avalaiable to make a node multilingual.


Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
 
Fields inherited from class javax.faces.component.UISelectOne
INVALID_MESSAGE_ID
 
Fields inherited from class javax.faces.component.UIInput
CONVERSION_MESSAGE_ID, REQUIRED_MESSAGE_ID
 
Constructor Summary
UILanguageSelector()
           
 
Method Summary
protected  javax.faces.model.SelectItem[] createList()
          Creates the list of SelectItem components to represent the list of Langages the user can select from
 void encodeBegin(javax.faces.context.FacesContext context)
           
 boolean isOnlyAvailableLanguages()
           
 boolean isReturnCurrentLanguage()
           
 void setOnlyAvailableLanguages(boolean onlyAvailableLanguages)
           
 void setReturnCurrentLanguage(boolean returnCurrentLanguage)
          Without effect if onlyAvailableLanguages is false
 
Methods inherited from class javax.faces.component.UISelectOne
getFamily, validateValue
 
Methods inherited from class javax.faces.component.UIInput
addValidator, addValueChangeListener, broadcast, compareValues, decode, getConvertedValue, getSubmittedValue, getValidator, getValidators, getValue, getValueChangeListener, getValueChangeListeners, isImmediate, isLocalValueSet, isRequired, isValid, processDecodes, processUpdates, processValidators, removeValidator, removeValueChangeListener, restoreState, saveState, setImmediate, setLocalValueSet, setRequired, setSubmittedValue, setValid, setValidator, setValue, setValueChangeListener, updateModel, validate
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, setConverter
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.faces.component.ValueHolder
getConverter, getLocalValue, setConverter
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values
Constructor Detail

UILanguageSelector

public UILanguageSelector()
Method Detail

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context)
                 throws java.io.IOException
Overrides:
encodeBegin in class javax.faces.component.UIComponentBase
Throws:
java.io.IOException

createList

protected javax.faces.model.SelectItem[] createList()
Creates the list of SelectItem components to represent the list of Langages the user can select from

Returns:
List of SelectItem components

isOnlyAvailableLanguages

public boolean isOnlyAvailableLanguages()
Returns:
true if the list of languages is filtered

setOnlyAvailableLanguages

public void setOnlyAvailableLanguages(boolean onlyAvailableLanguages)
Parameters:
onlyAvailableLanguages - the list of languages is filtered

isReturnCurrentLanguage

public boolean isReturnCurrentLanguage()
Returns:
true if the list must contain the language of the current node

setReturnCurrentLanguage

public void setReturnCurrentLanguage(boolean returnCurrentLanguage)
Without effect if onlyAvailableLanguages is false

Parameters:
returnCurrentLanguage - the list must contain the language of the current node


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.