org.alfresco.web.ui.common.component
Class UIBreadcrumb

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UICommand
              extended by org.alfresco.web.ui.common.component.UIBreadcrumb
All Implemented Interfaces:
javax.faces.component.ActionSource, javax.faces.component.StateHolder

public class UIBreadcrumb
extends javax.faces.component.UICommand


Nested Class Summary
static class UIBreadcrumb.BreadcrumbEvent
          Class representing the clicking of a breadcrumb element.
 
Field Summary
static java.lang.String SEPARATOR
          the separator for a breadcrumb path value
 
Fields inherited from class javax.faces.component.UICommand
COMPONENT_FAMILY, COMPONENT_TYPE
 
Constructor Summary
UIBreadcrumb()
          Default Constructor
 
Method Summary
 void appendHandler(IBreadcrumbHandler handler)
          Append a handler object to the current breadcrumb structure
 void broadcast(javax.faces.event.FacesEvent event)
           
 java.lang.String getFamily()
           
 java.lang.String getSeparator()
          Get the separator string to output between each breadcrumb element
 boolean getShowRoot()
          Get whether to show the root of the path
 java.lang.Object getValue()
          Override getValue() to deal with converting a String path into a valid List of IBreadcrumbHandler
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setSelectedPathIndex(int index)
          Set the selected path index.
 void setSeparator(java.lang.String separator)
          Set separator
 void setShowRoot(boolean showRoot)
          Set whether to show the root of the path
 
Methods inherited from class javax.faces.component.UICommand
addActionListener, getAction, getActionListener, getActionListeners, isImmediate, queueEvent, removeActionListener, setAction, setActionListener, setImmediate, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, 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
 

Field Detail

SEPARATOR

public static final java.lang.String SEPARATOR
the separator for a breadcrumb path value

See Also:
Constant Field Values
Constructor Detail

UIBreadcrumb

public UIBreadcrumb()
Default Constructor

Method Detail

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class javax.faces.component.UICommand
See Also:
UIComponent.getFamily()

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class javax.faces.component.UICommand
See Also:
StateHolder.restoreState(javax.faces.context.FacesContext, java.lang.Object)

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class javax.faces.component.UICommand
See Also:
StateHolder.saveState(javax.faces.context.FacesContext)

broadcast

public void broadcast(javax.faces.event.FacesEvent event)
               throws javax.faces.event.AbortProcessingException
Overrides:
broadcast in class javax.faces.component.UICommand
Throws:
javax.faces.event.AbortProcessingException
See Also:
UICommand.broadcast(javax.faces.event.FacesEvent)

setSelectedPathIndex

public void setSelectedPathIndex(int index)
Set the selected path index. This modifies the current path value.


getValue

public java.lang.Object getValue()
Override getValue() to deal with converting a String path into a valid List of IBreadcrumbHandler

Overrides:
getValue in class javax.faces.component.UICommand

appendHandler

public void appendHandler(IBreadcrumbHandler handler)
Append a handler object to the current breadcrumb structure

Parameters:
handler - The IBreadcrumbHandler to append

getSeparator

public java.lang.String getSeparator()
Get the separator string to output between each breadcrumb element

Returns:
separator string

setSeparator

public void setSeparator(java.lang.String separator)
Set separator

Parameters:
separator - the separator string to output between each breadcrumb element

getShowRoot

public boolean getShowRoot()
Get whether to show the root of the path

Returns:
true to show the root of the path, false to hide it

setShowRoot

public void setShowRoot(boolean showRoot)
Set whether to show the root of the path

Parameters:
showRoot - Whether to show the root of the path


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