Package org.apache.shiro.ee.faces.tags
Class PrincipalTag
java.lang.Object
javax.faces.component.UIComponent
javax.faces.component.UIComponentBase
javax.faces.component.UIOutput
org.apache.shiro.ee.faces.tags.SecureComponent
org.apache.shiro.ee.faces.tags.PrincipalTag
- All Implemented Interfaces:
EventListener,javax.faces.component.PartialStateHolder,javax.faces.component.StateHolder,javax.faces.component.TransientStateHolder,javax.faces.component.ValueHolder,javax.faces.event.ComponentSystemEventListener,javax.faces.event.FacesListener,javax.faces.event.SystemEventListenerHolder
Tag used to print out the String value of a user's default principal, or a specific principal as specified by the tag's attributes.
If no attributes are specified, the tag prints out the toString() value of the user's default principal. If the type attribute is specified, the tag looks for a principal with the given type. If the property attribute is specified, the tag prints the string value of the specified property of the principal. If no principal is found or the user is not authenticated, the tag displays nothing unless a defaultValue is specified.
-
Field Summary
Fields inherited from class javax.faces.component.UIOutput
COMPONENT_FAMILY, COMPONENT_TYPEFields inherited from class javax.faces.component.UIComponent
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoEncodeAll(javax.faces.context.FacesContext ctx) voidrestoreState(javax.faces.context.FacesContext context, Object state) saveState(javax.faces.context.FacesContext context) Methods inherited from class org.apache.shiro.ee.faces.tags.SecureComponent
encodeAll, getSubject, verifyAttributesMethods inherited from class javax.faces.component.UIOutput
clearInitialState, getConverter, getFamily, getLocalValue, getValue, markInitialState, resetValue, setConverter, setValueMethods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEventMethods inherited from class javax.faces.component.UIComponent
getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
-
Constructor Details
-
PrincipalTag
public PrincipalTag()
-
-
Method Details
-
doEncodeAll
- Specified by:
doEncodeAllin classSecureComponent- Throws:
IOException
-
saveState
- Specified by:
saveStatein interfacejavax.faces.component.StateHolder- Overrides:
saveStatein classjavax.faces.component.UIOutput
-
restoreState
- Specified by:
restoreStatein interfacejavax.faces.component.StateHolder- Overrides:
restoreStatein classjavax.faces.component.UIOutput
-