public abstract class BaseComponent
extends UIComponentBase
implements java.io.Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
BaseComponent.DecodePassData |
static interface |
BaseComponent.IEventQueue |
| Modifier and Type | Field and Description |
|---|---|
protected boolean[] |
m_attributesIsDynamicInfo |
protected boolean[] |
m_attributesIsManagedViaAdapterBinding |
protected boolean[] |
m_attributesReferenceInfo |
protected java.util.Set<java.lang.String> |
m_attributesSetViaStyle |
protected boolean[] |
m_attributesTakeOverInfo |
protected java.lang.Object[] |
m_currentDump |
protected java.util.Set<java.lang.String> |
m_explicitlyNulledAttributes |
protected long |
m_lastDumpRequestSequenceId |
protected java.lang.Object[] |
m_previousDump |
protected java.util.Map<java.lang.String,java.lang.String> |
m_styleValues |
protected java.util.List<java.lang.String> |
m_tagAttributes |
| Constructor and Description |
|---|
BaseComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExplicitlyNulledAttribute(java.lang.String attribute) |
protected void |
addValueBindingExec(FacesContext context,
java.lang.Object vb,
java.lang.Object value,
boolean flagSetMayFail)
Add value binding that is executed in the apply values phase.
|
protected void |
addValueExpressionExec(org.eclnt.jsfserver.elements.BaseComponent.SetValueExec vbe)
Add value binding that is executed in the apply values phase.
|
protected void |
appendDecodeInformation(java.util.List<BaseComponent.DecodePassData> decodeInfos)
Components can add own values to be transferred within the decode phase.
|
protected java.util.Set<java.lang.String> |
applyChangedStyleVariant() |
protected void |
buildAttributesIsDynamicInfo(java.util.List<java.lang.String> tagAttributes) |
boolean |
checkIfAttributeIsExplicitlyNulled(java.lang.String attribute) |
boolean |
checkIfAttributesIsManagedByExpression(java.lang.String name) |
protected boolean |
checkIfComponentHasAdapterBinding()
Check if component has adapter binding.
|
protected boolean |
checkIfComponentIdIsPartOfRequest(java.lang.String clientId) |
boolean |
checkIfComponentTagIsAvailable() |
boolean |
checkIfEncodeCalledFirstTime() |
protected boolean |
checkIfStyleVariantIsDynamic() |
protected boolean |
checkIfStyleVariantWasUpdated() |
protected boolean |
checkIfToTakeOverAttribute(java.lang.String attributeName)
In the decode phase the implementation takes over all attributes
defined in the JSP file into the generated page.
|
protected java.lang.String |
convertValueDuringDecode(java.lang.String value)
Gives implementations the chance to convert an incoming value to specific
needs.
|
protected java.lang.Object |
convertValueDuringGetAttribute(java.lang.String attribute,
java.lang.Object value)
Possibility to override and change the value.
|
int |
createNewIdCounter() |
java.lang.String |
createSubId() |
java.lang.String |
createSubId(java.lang.String sub)
Creates an id for components that are created within this component.
|
void |
decode(FacesContext context) |
protected void |
destroy() |
protected void |
detectChangesInSubComponents(java.io.Writer writer,
ComponentDump cd)
This methods checks if there was any change below the component that makes
it necessary to mark this component as changed within the XML output.
|
void |
encodeBegin(FacesContext context) |
void |
encodeChildren(FacesContext context) |
void |
encodeEnd(FacesContext context) |
static void |
ensureSessionIsValid(HttpSession session) |
protected void |
executeQueueingOfBufferedEvents()
Called by PAGEADDONS / HTPAGEADDONS2 component at end of page processing.
|
protected java.util.List<ValueManager.NameValue> |
findContentReplaceListDuringRendering()
This method returns the current content replacement list that is built up during the
recursive rendering of controls during the rendering phase.
|
protected ComponentDump |
findCurrentDump(FacesContext context) |
IComponentAdapterBinding |
getAdapterBindingAterEncodeBegin() |
java.lang.Object |
getApplicationReference() |
java.lang.Object |
getAttributeFromAdapterBinding(IComponentAdapterBinding adapterBinding,
java.lang.String attribute)
Central method for receiving value from component adapter binding
|
java.lang.Object |
getAttributeFromAdapterBinding(java.lang.String attribute) |
java.lang.Object |
getAttributesGet(java.lang.String attribute)
Central method for getting value of an attribute.
|
java.lang.Object |
getAttributesGet(java.lang.String attribute,
boolean viaAttributes)
Central method for getting value of an attribute.
|
java.util.Set<java.lang.String> |
getAttributesSetViaStyle() |
java.lang.String |
getAttributeString(java.lang.String name) |
java.lang.String |
getAttributeValueAsString(java.lang.String attribute) |
UIComponent |
getChild(int index)
Convenience method to retrieve child - return null if index
does not fit.
|
java.lang.String |
getClientTagName() |
protected IComponentAdapterBinding |
getComponentAdapterBinding()
Access component adapter binding.
|
protected java.lang.Class |
getComponentClass() |
java.lang.Object |
getExpressionFromComponentAttribute(java.lang.String attributeName)
Returns the expression object (binding object!
|
java.lang.String |
getFamily() |
java.lang.String |
getInnerEventRequestId()
This is the requet id of the last request that either manipulated data or called
an action listener within this component.
|
java.lang.String |
getOriginalAttributeString(java.lang.String name)
Returns the original attribute string that is defined in the corresponding
jsp page.
|
protected java.lang.String |
getParameterNameForDecode(FacesContext context)
Returns the name of the parameter that is used for decoding the request's
data.
|
protected java.lang.Class |
getPreferredDataType()
When passing a value into a value binding then by default the value binding
is asked for its data type.
|
boolean |
getRendersChildren() |
protected java.lang.Object |
getSavedState(FacesContext context,
BaseComponent bc) |
java.util.List<java.lang.String> |
getTagAttributes()
Returns a list of all attributes that could potencially be maintained with
this component.
|
protected boolean |
isDestroyed() |
boolean |
isRendered() |
protected ComponentRepository |
m_componentRepository() |
void |
passPropertyUsage(java.util.Set<java.lang.String> propertiesExplicitlySet,
java.util.List<java.lang.String> propertiesUsed,
java.util.List<java.lang.String> propertiesFix,
java.util.List<java.lang.String> propertiesExpression,
java.util.Map<java.lang.String,java.lang.String> originalAttributes)
With this method the
BaseComponentTag object passes information
which properties are used in which way. |
void |
passStyleValues(java.lang.String styleVariant,
java.util.Map<java.lang.String,java.lang.String> values,
java.util.Set<java.lang.String> attributesSetViaStyle) |
void |
processDecodes(FacesContext context) |
void |
processUpdates(FacesContext context) |
void |
processValidators(FacesContext context) |
void |
queueEvent(FacesEvent event) |
protected void |
queueEventExecute(FacesEvent event) |
void |
reactOnSetPropertiesByTagFinished() |
protected java.lang.Object |
readAttributeValueDuringEncodeFromAttributesOrFromAdapterBinding(java.lang.String attributeName) |
protected ComponentDump |
readCurrentComponentDump(FacesContext context) |
protected java.lang.String |
readDefaultUpdateAttribute() |
protected ComponentDump |
readPreviousComponentDump(FacesContext context) |
protected java.util.List<java.lang.String> |
readTagAttributes() |
protected java.util.Set<java.lang.String> |
readTagAttributesSet() |
void |
registerInnerEvent(java.lang.String requestId)
Any event is "registered" on the level, where it occurs - and delegated
to the next level.
|
void |
renderComponentNoChange(FacesContext context,
ResponseWriter writer,
ComponentDump currentDump)
In case of using event isolation inside ROWINCLUDE components may be
rendered in a way, so that the client directly sees that there was no
change within the component.
|
void |
resetInternalAttributeBuffer() |
void |
resetPreviousDump() |
java.lang.String |
resolveComponentValueAsString(boolean convertHTML) |
void |
restoreState(FacesContext context,
java.lang.Object state) |
protected java.lang.Object |
retrieveValueFromComponent(java.lang.String attribute)
The component may have some special rules for passing the value.
|
java.lang.Object |
saveState(FacesContext context) |
void |
setApplicationReference(java.lang.Object value)
A component can get an application reference which is typically used
in the case of using component binding with a managed bean - and
here especially when used inside grid processing.
|
void |
setAttributeValueFromOutside(java.lang.String attributeName,
java.lang.Object attributeValue)
If directly manipulating attribute values of a component...: this is the (only!)
|
void |
setComponentBinding(java.lang.String binding) |
protected void |
setCurrentComponentDump(ComponentDump cd)
Used of for special inheriting classes (e.g. grid).
|
void |
setExpressionAsComponentAttributeFromOutside(java.lang.String attributeName,
java.lang.Object expressionObject) |
void |
setParent(UIComponent parent) |
void |
setRendered(boolean rendered) |
void |
setRendersChildren(boolean value) |
protected void |
updateAttributeValue(FacesContext context,
java.lang.String attributeName,
java.lang.String value,
java.lang.Class preferredType,
boolean inUpdatePhase,
boolean flagSetMayFail)
Helper method: either set the value binding or the attribute.
|
protected void |
updateComponentBinding(FacesContext context)
done with every request
|
protected long m_lastDumpRequestSequenceId
protected java.lang.Object[] m_previousDump
protected java.lang.Object[] m_currentDump
protected java.util.List<java.lang.String> m_tagAttributes
protected boolean[] m_attributesTakeOverInfo
protected boolean[] m_attributesReferenceInfo
protected boolean[] m_attributesIsDynamicInfo
protected boolean[] m_attributesIsManagedViaAdapterBinding
protected java.util.Map<java.lang.String,java.lang.String> m_styleValues
protected java.util.Set<java.lang.String> m_attributesSetViaStyle
protected java.util.Set<java.lang.String> m_explicitlyNulledAttributes
public java.lang.Object saveState(FacesContext context)
public void restoreState(FacesContext context,
java.lang.Object state)
protected ComponentRepository m_componentRepository()
public void addExplicitlyNulledAttribute(java.lang.String attribute)
public boolean checkIfAttributeIsExplicitlyNulled(java.lang.String attribute)
public void passStyleValues(java.lang.String styleVariant,
java.util.Map<java.lang.String,java.lang.String> values,
java.util.Set<java.lang.String> attributesSetViaStyle)
public java.util.Set<java.lang.String> getAttributesSetViaStyle()
public java.lang.String getClientTagName()
public IComponentAdapterBinding getAdapterBindingAterEncodeBegin()
public java.lang.String getOriginalAttributeString(java.lang.String name)
public void registerInnerEvent(java.lang.String requestId)
public java.lang.String getInnerEventRequestId()
public void setApplicationReference(java.lang.Object value)
public java.lang.Object getApplicationReference()
public boolean getRendersChildren()
public void setRendersChildren(boolean value)
public void setRendered(boolean rendered)
public java.lang.String getFamily()
public void passPropertyUsage(java.util.Set<java.lang.String> propertiesExplicitlySet,
java.util.List<java.lang.String> propertiesUsed,
java.util.List<java.lang.String> propertiesFix,
java.util.List<java.lang.String> propertiesExpression,
java.util.Map<java.lang.String,java.lang.String> originalAttributes)
BaseComponentTag object passes information
which properties are used in which way.propertiesUsed - All the properties that are used.propertiesFix - All properties with fix value definitionspropertiesExpression - All properties with expression value definitionspublic void resetPreviousDump()
public void encodeBegin(FacesContext context)
throws java.io.IOException
java.io.IOExceptionpublic void encodeEnd(FacesContext context)
throws java.io.IOException
java.io.IOExceptionprotected void detectChangesInSubComponents(java.io.Writer writer,
ComponentDump cd)
public void encodeChildren(FacesContext context)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String getParameterNameForDecode(FacesContext context)
protected void appendDecodeInformation(java.util.List<BaseComponent.DecodePassData> decodeInfos)
public void processDecodes(FacesContext context)
public void processValidators(FacesContext context)
public void decode(FacesContext context)
public java.util.List<java.lang.String> getTagAttributes()
protected void addValueBindingExec(FacesContext context,
java.lang.Object vb,
java.lang.Object value,
boolean flagSetMayFail)
protected void addValueExpressionExec(org.eclnt.jsfserver.elements.BaseComponent.SetValueExec vbe)
public void setParent(UIComponent parent)
protected void destroy()
protected boolean isDestroyed()
public void processUpdates(FacesContext context)
public void setAttributeValueFromOutside(java.lang.String attributeName,
java.lang.Object attributeValue)
public final void resetInternalAttributeBuffer()
public void renderComponentNoChange(FacesContext context,
ResponseWriter writer,
ComponentDump currentDump)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String convertValueDuringDecode(java.lang.String value)
public java.lang.String getAttributeValueAsString(java.lang.String attribute)
protected java.util.Set<java.lang.String> readTagAttributesSet()
protected java.util.List<java.lang.String> readTagAttributes()
protected java.lang.String readDefaultUpdateAttribute()
public void reactOnSetPropertiesByTagFinished()
public void setComponentBinding(java.lang.String binding)
protected void updateComponentBinding(FacesContext context)
protected boolean checkIfToTakeOverAttribute(java.lang.String attributeName)
attributeName - attributeValue - protected void buildAttributesIsDynamicInfo(java.util.List<java.lang.String> tagAttributes)
public java.lang.String createSubId(java.lang.String sub)
public java.lang.String createSubId()
public int createNewIdCounter()
public java.lang.String getAttributeString(java.lang.String name)
public boolean checkIfAttributesIsManagedByExpression(java.lang.String name)
public UIComponent getChild(int index)
protected ComponentDump readCurrentComponentDump(FacesContext context)
protected ComponentDump readPreviousComponentDump(FacesContext context)
protected java.lang.Class getPreferredDataType()
protected void updateAttributeValue(FacesContext context,
java.lang.String attributeName,
java.lang.String value,
java.lang.Class preferredType,
boolean inUpdatePhase,
boolean flagSetMayFail)
public static void ensureSessionIsValid(HttpSession session)
public java.lang.String resolveComponentValueAsString(boolean convertHTML)
public final java.lang.Object getAttributesGet(java.lang.String attribute)
viaAttributes - false => default - the attribute value is either directly defined or the
attribute value has a corresponding value expression.public java.lang.Object getAttributesGet(java.lang.String attribute,
boolean viaAttributes)
viaAttributes - true => default - the attribute value is either directly defined or the
attribute value has a corresponding value expression.protected java.lang.Object retrieveValueFromComponent(java.lang.String attribute)
protected java.lang.Object convertValueDuringGetAttribute(java.lang.String attribute,
java.lang.Object value)
public java.lang.Object getAttributeFromAdapterBinding(java.lang.String attribute)
public java.lang.Object getAttributeFromAdapterBinding(IComponentAdapterBinding adapterBinding, java.lang.String attribute)
attributeName - public java.lang.Object getExpressionFromComponentAttribute(java.lang.String attributeName)
public void setExpressionAsComponentAttributeFromOutside(java.lang.String attributeName,
java.lang.Object expressionObject)
protected java.lang.Object readAttributeValueDuringEncodeFromAttributesOrFromAdapterBinding(java.lang.String attributeName)
public boolean isRendered()
protected java.lang.Object getSavedState(FacesContext context,
BaseComponent bc)
protected final ComponentDump findCurrentDump(FacesContext context)
protected java.util.List<ValueManager.NameValue> findContentReplaceListDuringRendering()
public final void queueEvent(FacesEvent event)
protected final void queueEventExecute(FacesEvent event)
protected java.util.Set<java.lang.String> applyChangedStyleVariant()
protected boolean checkIfComponentHasAdapterBinding()
protected IComponentAdapterBinding getComponentAdapterBinding()
protected java.lang.Class getComponentClass()
public boolean checkIfComponentTagIsAvailable()
public boolean checkIfEncodeCalledFirstTime()
protected boolean checkIfStyleVariantWasUpdated()
protected boolean checkIfStyleVariantIsDynamic()
protected void setCurrentComponentDump(ComponentDump cd)
protected void executeQueueingOfBufferedEvents()
protected boolean checkIfComponentIdIsPartOfRequest(java.lang.String clientId)
Copyright © CaptainCasa Gmbh. All Rights Reserved.