public class PrincipalTag extends SecureComponent
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.
log
Constructor and Description |
---|
PrincipalTag() |
Modifier and Type | Method and Description |
---|---|
protected void |
doEncodeAll(javax.faces.context.FacesContext ctx) |
String |
getDefaultValue() |
String |
getProperty() |
String |
getType() |
void |
restoreState(javax.faces.context.FacesContext context,
Object state) |
Object |
saveState(javax.faces.context.FacesContext context) |
void |
setDefaultValue(String defaultValue) |
void |
setProperty(String property) |
void |
setType(String type) |
encodeAll, getSubject, verifyAttributes
clearInitialState, getConverter, getFamily, getLocalValue, getValue, markInitialState, setConverter, setValue
addClientBehavior, addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEvent, visitTree
public String getType()
public void setType(String type)
public String getProperty()
public void setProperty(String property)
public String getDefaultValue()
public void setDefaultValue(String defaultValue)
protected void doEncodeAll(javax.faces.context.FacesContext ctx) throws IOException
doEncodeAll
in class SecureComponent
IOException
public Object saveState(javax.faces.context.FacesContext context)
saveState
in interface javax.faces.component.StateHolder
saveState
in class javax.faces.component.UIOutput
public void restoreState(javax.faces.context.FacesContext context, Object state)
restoreState
in interface javax.faces.component.StateHolder
restoreState
in class javax.faces.component.UIOutput
Copyright © 2014. All Rights Reserved.