public class ViewImpl extends View implements JSONSerializable
Constructor and Description |
---|
ViewImpl(String viewId,
String lang,
String dir,
String featureId,
java.util.Map<String,Object> clientState)
Constructor
|
Modifier and Type | Method and Description |
---|---|
Object |
getClientState(Node node)
Get the client state for a given node
|
static ViewImpl |
getInstance(String featureId)
Get the current view from the view scope
|
Object |
getKey(Object stampKey)
Given a potential client version of the stamp key, get the embedded key object
|
String |
getLanguage()
Returns the language set on the web view document element
|
Node |
getNodeById(String nodeId)
Find a node by its ID.
|
static oracle.maf.impl.amx.NodeChangesTracker |
getNodeChangesTracker(String featureId)
Convenience method to get the current node change tracker
|
Node |
getRootNode() |
String |
getStampForId(String stampKey)
Get a stamp key that is escaped to be valid for inclusion in an HTML ID attribute
|
Object |
getStampKey(Object key)
Get a stamp key for a stamp object.
|
TagImpl |
getTagForViewId(String viewId)
Get a tag for a nested view ID using caching.
|
String |
getViewId() |
static boolean |
isAmxView(TagImpl tag)
Checks if the tag is an AMX view tag.
|
boolean |
isLeftToRight()
Checks if the current language is rendered left-to-right
|
boolean |
isRightToLeft()
Checks if the current language is rendered right-to-left
|
void |
nodeAdded(Node node)
Call when a node is added to the view to be able to update the ID map
|
void |
nodeRemoved(Node node)
Call when a node is removed from the view to be able to update the ID map
|
boolean |
registerTag(TagImpl tag)
Registers that a tag is being used by the view.
|
Object |
setClientState(Node node,
Object state)
Set the client state for a node that is stored on the view
|
void |
setRootNode(Node rootNode)
Sets the root node
|
void |
tearDown()
Perform any clean up needed when a view is being disposed
|
Object |
toJSON()
Returns an empy JSON object to prevent this class from being serialized to the WebView
|
public ViewImpl(String viewId, String lang, String dir, String featureId, java.util.Map<String,Object> clientState)
viewId
- the ID of the view, the one requested by the clientclientState
- the client statelang
- the language set on the documentdirection
- the value of the 'dir' HTML attributefeatureId
- the ID of the featurepublic static ViewImpl getInstance(String featureId)
featureId
- the ID of the feature for the viewpublic static boolean isAmxView(TagImpl tag)
public boolean isRightToLeft()
View
isRightToLeft
in class View
public boolean isLeftToRight()
View
isLeftToRight
in class View
public String getLanguage()
View
getLanguage
in class View
public String getViewId()
public Node getRootNode()
getRootNode
in class View
public void setRootNode(Node rootNode)
rootNode
- the root nodepublic Node getNodeById(String nodeId)
View
getNodeById
in class View
nodeId
- the node IDpublic void nodeAdded(Node node)
node
- the added nodepublic void nodeRemoved(Node node)
node
- the added nodepublic Object getClientState(Node node)
View
getClientState
in class View
node
- the nodepublic Object setClientState(Node node, Object state)
View
setClientState
in class View
node
- the nodestate
- the state of the nodepublic void tearDown()
public Object toJSON() throws Exception
toJSON
in interface JSONSerializable
Exception
public Object getStampKey(Object key)
View
getStampKey
in class View
key
- the stamppublic String getStampForId(String stampKey)
stampKey
- the string version of a stamp key from getStampKey(Object)
public Object getKey(Object stampKey)
View
public boolean registerTag(TagImpl tag)
tag
- the tag that may be newpublic TagImpl getTagForViewId(String viewId)
viewId
- the view ID of the fragmentpublic static oracle.maf.impl.amx.NodeChangesTracker getNodeChangesTracker(String featureId)