Class AbstractWComponent.WComponentRef
- java.lang.Object
-
- com.github.bordertech.wcomponents.AbstractWComponent
-
- com.github.bordertech.wcomponents.AbstractWComponent.WComponentRef
-
- All Implemented Interfaces:
WComponent
,WebComponent
,Serializable
- Enclosing class:
- AbstractWComponent
public static final class AbstractWComponent.WComponentRef extends AbstractWComponent
This class is used to hold a reference to the shared singleton instance of a wcomponent for the purpose of serialisation. Serialization of WComponent session information is tricky because of the separation of the session state data (the UIContext) and the shared application definition (the wcompontent stored in the UIRegistry). When serializing a UIContext, we don't want to serialize the entire shared application definition in each users session. The problem is that the data stored in the UIContext is keyed using the shared WComponent instances, so we must convert them all to references in order to prevent the entire application from being serialized.
This extends WComponent in order to fulfil the readResolve contract, however it overrides writeObject/readObject to only write out the data needed to find the shared instance.
- Author:
- Yiannis Paschalidis
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.bordertech.wcomponents.AbstractWComponent
AbstractWComponent.WComponentRef
-
-
Field Summary
-
Fields inherited from interface com.github.bordertech.wcomponents.WComponent
DEFAULT_APPLICATION_ID, DEFAULT_INTERNAL_ID, DEFAULT_NO_ID, ID_CONTEXT_SEPERATOR, ID_FRAMEWORK_ASSIGNED_SEPERATOR, ID_VALIDATION_PATTERN
-
-
Constructor Summary
Constructors Constructor Description WComponentRef(String repositoryKey, int[] nodeLocation)
Creates a WComponentRef.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
toString()
Creates a String representation of this component; usually for debugging purposes.-
Methods inherited from class com.github.bordertech.wcomponents.AbstractWComponent
addHtmlClass, addHtmlClass, addNotify, afterPaint, assertAddSupported, beforePaint, createErrorDiagnostic, createErrorDiagnostic, forward, getAccessibleText, getAttribute, getBaseUrl, getComponentModel, getDefaultModel, getEnvironment, getHeaders, getHtmlClass, getHtmlClasses, getId, getIdName, getInternalId, getLabel, getName, getOrCreateComponentModel, getParent, getScratchMap, getTabIndex, getTag, getTemplate, getTemplateMarkUp, getToolTip, handleRequest, hasNoComponentModel, hasTabIndex, initialiseComponentModel, invokeLater, invokeLaters, isDebugStructure, isDefaultState, isFlagSet, isHidden, isInitialised, isLocked, isTracking, isTrackingEnabled, isValidate, isVisible, newComponentModel, paint, paintComponent, preparePaint, preparePaintComponent, removeAttribute, removeComponentModel, removeHtmlClass, removeHtmlClass, removeNotify, replaceWComponent, reset, serviceRequest, setAccessibleText, setAttribute, setEnvironment, setFlag, setFocussed, setHidden, setHtmlClass, setHtmlClass, setIdName, setInitialised, setLocked, setTag, setToolTip, setTrackingEnabled, setValidate, setVisible, showErrorIndicators, showErrorIndicatorsForComponent, showWarningIndicators, showWarningIndicatorsForComponent, tidyUpUIContext, tidyUpUIContextForTree, validate, validateComponent, writeReplace
-
-
-
-
Constructor Detail
-
WComponentRef
public WComponentRef(String repositoryKey, int[] nodeLocation)
Creates a WComponentRef.- Parameters:
repositoryKey
- the UIRegistry key under which the UI root component is registered.nodeLocation
- the location of the component in the UI tree.
-
-
Method Detail
-
toString
public String toString()
Creates a String representation of this component; usually for debugging purposes.- Overrides:
toString
in classAbstractWComponent
- Returns:
- a String representation of this component.
-
-