public abstract class RegionModel extends Object
Modifier and Type | Class and Description |
---|---|
static class |
RegionModel.RegionAction
Metadata constants for available actions
|
Modifier and Type | Field and Description |
---|---|
static String |
REMOTE_REGION_ATTRIB
A constant represening an Attribute on the view root which contains a Set of RemoteRegion client ids
|
Constructor and Description |
---|
RegionModel() |
Modifier and Type | Method and Description |
---|---|
protected void |
addRegionClientId(String clientId, boolean isNew)
Called whenever a clientId is added to the RegionComponentClientId set.
|
List<? extends RegionModel.RegionAction> |
getActions()
Returns the unmodifiable List of valid RegionActions for the current state of the Region, in display order.
|
Set<String> |
getCapabilities()
Returns the unmodifiable Set of outcomes for the current state of the RegionModel The list of available capabilities is implementation specific.
|
Set<String> |
getRegionComponentClientIds()
Retrieves the Set of component client IDs of region components that are associated with this RegionModel.
|
protected RegionModelListener |
getRegionModelListener()
Provides RegionModelListener listener used by this model
|
DirtyPageHandler.UncommittedDataWarning |
getUncommittedDataWarning()
Returns a default value for the Uncommitted Data Warning configuration option
|
Serializable |
getViewHandle(javax.faces.context.FacesContext context)
Returns a unique identifier for the RegionModel's current component tree.
|
abstract String |
getViewId(javax.faces.context.FacesContext context)
Gets the viewId of the region's content.
|
boolean |
isDataDirty()
Called during the RenderResponse phase to determine whether the region model contains uncommitted data.
|
void |
markRegionDirty()
If a region component client ID gets associated with this RegionModel instance then this method will mark that component as needing to be redrawn.
|
void |
processBeginRegion(javax.faces.context.FacesContext context)
Deprecated.
|
void |
processBeginRegion(javax.faces.context.FacesContext context, RegionSite regionSite)
Called just before rendering the region's content.
|
void |
processEndRegion(javax.faces.context.FacesContext context)
Deprecated.
|
void |
processEndRegion(javax.faces.context.FacesContext context, RegionSite regionSite)
Called just after rendering the region's content.
|
void |
refresh(javax.faces.context.FacesContext context)
Clears out any cached content held by this model.
|
void |
release(javax.faces.context.FacesContext context)
Called to notify the RegionModel that it will no longer be used and that it may release any resources it is holding.
|
protected void |
removeRegionClientId(String clientId)
Called whenever a clientId is removed from the RegionComponentClientId set.
|
void |
setRegionModelListener(RegionModelListener listener)
Sets RegionModelListener instance for this model
|
public static final String REMOTE_REGION_ATTRIB
public boolean isDataDirty()
true
if the current RegionModel contains uncommitted data.public DirtyPageHandler.UncommittedDataWarning getUncommittedDataWarning()
public void setRegionModelListener(RegionModelListener listener)
listener
- - RegionModelListener instance, which may be nullprotected RegionModelListener getRegionModelListener()
@Deprecated public void processBeginRegion(javax.faces.context.FacesContext context)
context
- the FacesContextIllegalStateException
- if the RegionModel currently has processBeginRegion called on it.processBeginRegion(FacesContext, RegionSite)
public void processBeginRegion(javax.faces.context.FacesContext context, RegionSite regionSite)
context
- the FacesContextregionSite
- the RegionSite, providing access to site-specific information and services. The RegionSite is only valid between processBeginRegion and processEndRegion.IllegalStateException
- if the RegionModel currently has processBeginRegion called on it.@Deprecated public void processEndRegion(javax.faces.context.FacesContext context)
context
- the FacesContextIllegalStateException
- if the RegionModel does not currently has processBeginRegion called on it.processEndRegion(FacesContext, RegionSite)
public void processEndRegion(javax.faces.context.FacesContext context, RegionSite regionSite)
context
- the FacesContextregionSite
- the RegionSite, providing access to site-specific information and services. The RegionSite is only valid between processBeginRegion and processEndRegion. This instance is identical to the instance passed to RegionModel.processBeginRegion
and is passed here as a convenience to the RegionModel.IllegalStateException
- if the RegionModel does not currently have processBeginRegion called on it.processBeginRegion(FacesContext, RegionSite)
public void refresh(javax.faces.context.FacesContext context)
This method should not be called directly. Instead UIXRegion.refresh(javax.faces.context.FacesContext)
may be called.
public void release(javax.faces.context.FacesContext context)
context
- the FacesContext.public Set<String> getCapabilities()
Capabilities are typically used by a region's container component, which paints the chrome around the region; depending on the region's capabilities, the container may show different icons.
This implementation returns an empty Set.
getActions()
public List<? extends RegionModel.RegionAction> getActions()
getCapabilities
.getCapabilities()
public Serializable getViewHandle(javax.faces.context.FacesContext context)
equals
and hashCode
. For backwards compatibility, the default implementation returns the viewId, however RegionModel implementations that support the same viewId creating different component trees, must override this method to return an identifier per component tree.getViewId(javax.faces.context.FacesContext)
public abstract String getViewId(javax.faces.context.FacesContext context)
processBeginRegion(javax.faces.context.FacesContext)
must be called before this method is called.context
- the FacesContextpublic void markRegionDirty()
If a region component client ID gets associated with this RegionModel instance then this method will mark that component as needing to be redrawn.
If the the client ID does not match with any component reachable from the view root of the FacesContext, then it will not be markd for redraw and may be disassociated with this model.
public Set<String> getRegionComponentClientIds()
Retrieves the Set of component client IDs of region components that are associated with this RegionModel.
These client IDs will be used to help mark components as needing to be redrawn if this RegionModel instance is marked as dirty.
protected void addRegionClientId(String clientId, boolean isNew)
clientId
-isNew
-protected void removeRegionClientId(String clientId)
clientId
-