Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 2 (11.1.2.2.0)
E17488-03


oracle.adf.view.rich.model
Class RegionModel

java.lang.Object
  extended by oracle.adf.view.rich.model.RegionModel


public abstract class RegionModel
extends java.lang.Object

Model for the Region component.


Nested Class Summary
static class RegionModel.RegionAction
          Metadata constants for available actions

 

Constructor Summary
RegionModel()
           

 

Method Summary
 java.util.List<? extends RegionModel.RegionAction> getActions()
          Returns the unmodifiable List of valid RegionActions for the current state of the Region, in display order.
 java.util.Set<java.lang.String> getCapabilities()
          Returns the unmodifiable Set of outcomes for the current state of the RegionModel The list of available capabilities is implementation specific.
 java.util.Set<java.lang.String> getRegionComponentClientIds()
          Retrieves the Set of component client IDs of region components that are associated with this RegionModel.
abstract  java.lang.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.
protected  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.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

RegionModel

public RegionModel()

Method Detail

isDataDirty

public boolean isDataDirty()
Called during the RenderResponse phase to determine whether the region model contains uncommitted data. If there is uncommitted data then calling release() on the RegionModel will result in a loss of data. By default this method returns false.
Returns:
true if the current RegionModel contains uncommitted data.

processBeginRegion

@Deprecated
public void processBeginRegion(javax.faces.context.FacesContext context)
Deprecated. 
Called just before rendering the region's content. This method has been deprecated and the default implementation now throws a UnsupportedOperationException. Implementors should override processBeginRegion(FacesContext, RegionSite) instead.
Parameters:
context - the FacesContext
Throws:
java.lang.IllegalStateException - if the RegionModel currently has processBeginRegion called on it.
See Also:
processBeginRegion(FacesContext, RegionSite)

processBeginRegion

public void processBeginRegion(javax.faces.context.FacesContext context,
                               RegionSite regionSite)
Called just before rendering the region's content. For backwards compatibility the default implementation calls the deprecated method (of the same name). It's recommended that model implementors override this method.
Parameters:
context - the FacesContext
regionSite - the RegionSite, providing access to site-specific information and services. The RegionSite is only valid between processBeginRegion and processEndRegion.
Throws:
java.lang.IllegalStateException - if the RegionModel currently has processBeginRegion called on it.

processEndRegion

@Deprecated
public void processEndRegion(javax.faces.context.FacesContext context)
Deprecated. 
Called just after rendering the region's content. This method has been deprecated and the default implementation now throws a UnsupportedOperationException. Implementors should override processEndRegion(FacesContext, RegionSite) instead.
Parameters:
context - the FacesContext
Throws:
java.lang.IllegalStateException - if the RegionModel does not currently has processBeginRegion called on it.
See Also:
processEndRegion(FacesContext, RegionSite)

processEndRegion

public void processEndRegion(javax.faces.context.FacesContext context,
                             RegionSite regionSite)
Called just after rendering the region's content. For backwards compatibility the default implementation calls the deprecated method (of the same name). It's recommended that model implementors override this method.
Parameters:
context - the FacesContext
regionSite - 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.
Throws:
java.lang.IllegalStateException - if the RegionModel does not currently have processBeginRegion called on it.
See Also:
processBeginRegion(FacesContext, RegionSite)

refresh

public void refresh(javax.faces.context.FacesContext context)
Clears out any cached content held by this model. The next time the region component renders, this model will recompute everything and possibly return new viewIds.

This method should not be called directly. Instead UIXRegion.refresh(javax.faces.context.FacesContext) may be called.


release

public 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. Note: Calling this method does not necessarily indicate the end of the RegionModel's lifespan. Subsequent calls to processBeginRegion() should result in the RegionModel reinitializing itself into its initial state.
Parameters:
context - the FacesContext.

getCapabilities

public java.util.Set<java.lang.String> getCapabilities()
Returns the unmodifiable Set of outcomes for the current state of the RegionModel The list of available capabilities is implementation specific. Each capability is a String. Examples of capabilities include: "edit" - if the region is capable of allowing the user to edit it, "help" - if the region provides a help page to the user. "print" - if the region is capable of providing a printable-page of itself.

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.

Returns:
the set of capabilities for this RegionModel
See Also:
getActions()

getActions

public java.util.List<? extends RegionModel.RegionAction> getActions()
Returns the unmodifiable List of valid RegionActions for the current state of the Region, in display order. There should be a corresponding RegionAction outcome for every outcome returned by getCapabilities.
Returns:
The List of valid RegionActions or an empty List if no RegionActiosn are available for the current Region state.
See Also:
getCapabilities()

getViewId

public abstract java.lang.String getViewId(javax.faces.context.FacesContext context)
Gets the viewId of the region's content. processBeginRegion(javax.faces.context.FacesContext) must be called before this method is called.
Parameters:
context - the FacesContext
Returns:
the viewId of the region's content

markRegionDirty

protected 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.


getRegionComponentClientIds

public java.util.Set<java.lang.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.

Returns:
the set of component client IDs that are associated with this model

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 2 (11.1.2.2.0)
E17488-03


Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.