Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-06


oracle.adf.view.rich.activedata
Class ActiveModelContext

java.lang.Object
  extended by oracle.adf.view.rich.activedata.ActiveModelContext


public final class ActiveModelContext
extends java.lang.Object

Called by ActiveDataModel implementations whenever a model attribute which supports active data is dereferenced. When the attribute is dereferenced and the ActiveDataModel's ActiveDataPolicy isn't STATIC, the ActiveDataModel should:

  1. Fetch the current ActiveModelContext instance by calling ActiveModelContext.getActiveModelContext
  2. Call addActiveModelInfo with the current keyPath and model attribute

If retrieving the parameters to pass to addActiveModelInfo might be expensive, isComponentInterestedInActiveData may be called first to determine whether the call to addActiveModelInfo will even be necessary.


Method Summary
 void addActiveModelInfo(ActiveDataModel activeModel, java.lang.Object[] keyPath, java.lang.String modelAttrName)
           Registers the model key path and attribute to associate with the current active component attribute, if any.
static ActiveModelContext getActiveModelContext()
          Retrieves the ActiveModelContext instance for this Thread.
 javax.faces.component.UIComponent getCurrentActiveComponent()
          Returns the current component that active data and auto-PPR information is being collected for.
 boolean isComponentInterestedInActiveData()
          Returns true if the current component supports active data and thus a call to addActiveModelInfo is worthwhile.

 

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

 

Method Detail

getActiveModelContext

public static ActiveModelContext getActiveModelContext()
Retrieves the ActiveModelContext instance for this Thread.
Returns:
the ActiveModelContext instance for this Thread.

isComponentInterestedInActiveData

public boolean isComponentInterestedInActiveData()
Returns true if the current component supports active data and thus a call to addActiveModelInfo is worthwhile.
Returns:
true if the current component supports active data.
See Also:
addActiveModelInfo(oracle.adf.view.rich.model.ActiveDataModel, java.lang.Object[], java.lang.String)

addActiveModelInfo

public void addActiveModelInfo(ActiveDataModel activeModel,
                               java.lang.Object[] keyPath,
                               java.lang.String modelAttrName)

Registers the model key path and attribute to associate with the current active component attribute, if any. If the current component doesn't support active data or the active data policy of the current ActiveDataModel is ActiveDataPolicy.STATIC, no registration will occur.

If collecting the parameters to call addActiveModelInfo with might be expensive, the ActiveDataModel implementation should first check that it's ActiveDataPolicy isn't ActiveDataPolicy.STATIC and that isComponentInterestedInActiveData is true.
Parameters:
activeModel - The ActiveDataModel instance that will push the data.
keyPath - rowKey path to the model attribute name, if any. Active data on different paths will be ignored.
modelAttrName - Name of model attribute supporting active data
See Also:
isComponentInterestedInActiveData()

getCurrentActiveComponent

public javax.faces.component.UIComponent getCurrentActiveComponent()
Returns the current component that active data and auto-PPR information is being collected for. This may not be the current component that is rendering, but may instead be one of its ancestors, or null if no active data dependencies are currently being collected.
Returns:
current component that ActiveDataModel dependencies are being collected for.
See Also:
ActiveComponentContext.pushActiveComponent(javax.faces.context.FacesContext, javax.faces.component.UIComponent)

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-06


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