fi.hut.tml.xsmiles.mlfc.xforms.dom
Class DynBoundElementImpl

java.lang.Object
  extended byorg.apache.xerces.dom.NodeImpl
      extended byorg.apache.xerces.dom.ChildNode
          extended byorg.apache.xerces.dom.ParentNode
              extended byorg.apache.xerces.dom.ElementImpl
                  extended byorg.apache.xerces.dom.ElementNSImpl
                      extended byfi.hut.tml.xsmiles.dom.XSmilesElementImpl
                          extended byfi.hut.tml.xsmiles.dom.VisualElementImpl
                              extended byfi.hut.tml.xsmiles.mlfc.xforms.dom.XFormsElementImpl
                                  extended byfi.hut.tml.xsmiles.mlfc.xforms.dom.DynBoundElementImpl
All Implemented Interfaces:
java.lang.Cloneable, CSSStyleChangeListener, DynamicDependencyListener, org.w3c.dom.Element, ElementWithContext, org.w3c.dom.events.EventListener, org.w3c.dom.events.EventTarget, ExpressionContainer, InitializableElement, org.w3c.dom.Node, org.w3c.dom.NodeList, PseudoClassController, ResourceFetcher, java.io.Serializable, StylableElement, org.w3c.dom.TypeInfo, VisualElement, XFormsConstants, XFormsElement, XSmilesLayoutReference
Direct Known Subclasses:
ActionHandlerBaseImpl, CaptionElementImpl, CopyElementImpl, FileNameElementImpl, GroupElementImpl, HintElementImpl, ItemElementImpl, ItemSetElementImpl, MediaTypeElementImpl, RepeatElementImpl, SetIndexElementImpl, ValueElementImpl, XFormsControl

public abstract class DynBoundElementImpl
extends XFormsElementImpl
implements XFormsConstants, DynamicDependencyListener, ElementWithContext

The superclass of all XForms elements that are bound to an instance node It will listen for changes in the bound element, as well as all changes to the binding itself, and will signal these changes up in the presentation DOM.

Author:
Mikko Honkala
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl
XSmilesElementImpl.PseudoNodeList
 
Field Summary
protected  BindElementImpl bind
           
static short BINDING_ATTRIBUTES_NOT_FOUND
          state: bindind attributes not found
static short BINDING_FAILED
          state: bindind failed (fatal error)
static short BINDING_OK
          state: binding ok
protected  short binding_state
          the current binding state, one of the above
protected  boolean bindingAttributesRequired
          are binding attributes required (e.g.
static short BOUND_NODE_NOT_FOUND
          state: bound node was not found (non-relevant control)
protected  InstanceNode contextNode
          Repeat may set this context node
protected  boolean init
          are we initializing the control
protected  ModelElementImpl myModel
          Gets my model element.
protected  XPathExpr refExpr
           
static short UNINITIALIZED
          state: unitialized
 
Fields inherited from class fi.hut.tml.xsmiles.mlfc.xforms.dom.XFormsElementImpl
debugEvents, EVENTS_NS, handler, inited, ownerDoc
 
Fields inherited from class fi.hut.tml.xsmiles.dom.VisualElementImpl
views
 
Fields inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl
DESTROYED, elementStatus, INITIALIZED, INITIALIZING, setPseudoClasses, style, xblpropname
 
Fields inherited from class org.apache.xerces.dom.ElementNSImpl
localName, namespaceURI
 
Fields inherited from class org.apache.xerces.dom.ElementImpl
attributes, name
 
Fields inherited from class org.apache.xerces.dom.ParentNode
firstChild, fNodeListCache, ownerDocument
 
Fields inherited from class org.apache.xerces.dom.ChildNode
nextSibling, previousSibling
 
Fields inherited from class org.apache.xerces.dom.NodeImpl
DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_IS_CONTAINED, DOCUMENT_POSITION_PRECEDING, ELEMENT_DEFINITION_NODE, FIRSTCHILD, flags, HASSTRING, ID, IGNORABLEWS, OWNED, ownerNode, READONLY, SPECIFIED, SYNCCHILDREN, SYNCDATA, TREE_POSITION_ANCESTOR, TREE_POSITION_DESCENDANT, TREE_POSITION_DISCONNECTED, TREE_POSITION_EQUIVALENT, TREE_POSITION_FOLLOWING, TREE_POSITION_PRECEDING, TREE_POSITION_SAME_NODE, UNNORMALIZED
 
Fields inherited from interface fi.hut.tml.xsmiles.mlfc.xforms.XFormsConstants
ACCESSKEY, ACTION_ATTRIBUTE, ACTION_ELEMENT, ACTIVATE_EVENT, ACTIVE_CASE_PSEUDOCLASS, ALERT_ELEMENT, ALERT_EVENT, APPEARANCE_ATTRIBUTE, AT_ATTRIBUTE, BasicDataFactoryClassName, BEFORE_ATTRIBUTE, BIND_ATTRIBUTE, BIND_ELEMENT, BINDING_EXCEPTION, BLUR_EVENT, BUBBLES_ATTRIBUTE, BUTTON_ELEMENT, CALCULATE_ATTRIBUTE, CANCELABLE_ATTRIBUTE, CAPTION_CHANGED, CAPTION_ELEMENT, CASE_ATTRIBUTE, CASE_ELEMENT, CDATA_SECTION_ELEMENTS_ATTRIBUTE, CHOICES_ELEMENT, COMPUTE_EXCEPTION, CONSTRAINT_ATTRIBUTE, CONTROL_ATTRIBUTE, COPY_ELEMENT, DELETE_ELEMENT, DELETE_EVENT, DESELECT_EVENT, DESTROY_ELEMENT, DESTROY_EVENT, DISABLED_EVENT, DISABLED_PSEUDOCLASS, DISPATCH_ELEMENT, DUPLICATE_ELEMENT, DUPLICATE_EVENT, ENABLED_EVENT, ENABLED_PSEUDOCLASS, ENCODING_ATTRIBUTE, END_ATTRIBUTE, EXTENSION, EXTERNAL_LINKING_ATTR, FILENAME, FILENAME_ELEMENT, FOCUS_EVENT, FOCUSIN_NOTIFICATION_EVENT, FOCUSOUT_NOTIFICATION_EVENT, FUNC_INDEX, FUNC_NODEINDEX, FUNCTIONS_ATTRIBUTE, GROUP, GROUP_ELEMENT, HELP, HELP_ELEMENT, HELP_EVENT, HINT, HINT_ELEMENT, HINT_EVENT, INACTIVE_CASE_PSEUDOCLASS, INCLUDENAMESPACEPREFIXES_ATTRIBUTE, INCREMENTAL_ATTRIBUTE, INDENT_ATTRIBUTE, INDEX_ATTRIBUTE, INPUT, INPUT_ELEMENT, INPUTMODE_ATTRIBUTE, INRANGE_EVENT, INRANGE_PSEUDOCLASS, INSERT, INSERT_ELEMENT, INSERT_EVENT, INSTANCE, INSTANCE_ELEMENT, InstanceDocumentClassname, INVALID_DATATYPE_ERROR, INVALID_EVENT, INVALID_PSEUDOCLASS, ISVALID_ATTRIBUTE, ITEM, ITEM_ELEMENT, ITEMSET, ITEMSET_ELEMENT, LABEL, LEVEL_ATTRIBUTE, LINK_ERROR, LINK_EXCEPTION, LOAD, LOADURI_ELEMENT, MAXOCCURS_ATTRIBUTE, MEDIA_TYPE_ELEMENT, MEDIARENDERING_PSEUDOCLASS, MEDIATYPE, MEDIATYPE_ATTRIBUTE, MESSAGE, MESSAGE_ELEMENT, METHOD_ATTRIBUTE, MINOCCURS_ATTRIBUTE, MODEL_ATTRIBUTE, MODEL_CONSTRUCT_DONE_EVENT, MODEL_CONSTRUCT_EVENT, MODEL_DESTRUCT_EVENT, MODEL_ELEMENT, MODEL_ID_ATTRIBUTE, NAME_ATTRIBUTE, NAVINDEX_ATTRIBUTE, NEXT_EVENT, NODESET_ATTRIBUTE, NUMBER_ATTRIBUTE, OMIT_XML_DECLARATION_ATTRIBUTE, OPTIONAL_EVENT, ORIGIN_ATTRIBUTE, OUTOFRANGE_EVENT, OUTOFRANGE_PSEUDOCLASS, OUTPUT_ELEMENT, P3PTYPE_ATTRIBUTE, POSITION_ATTRIBUTE, PREVIOUS_EVENT, PSVIDocumentClassname, PSVISchemaPoolClassName, RANGE, RANGE_ELEMENT, READONLY_ATTRIBUTE, READONLY_EVENT, READONLY_PSEUDOCLASS, READWRITE_EVENT, READWRITE_PSEUDOCLASS, READY_EVENT, REBUILD_ELEMENT, REBUILD_EVENT, RECALCULATE_ELEMENT, RECALCULATE_EVENT, REF_ATTRIBUTE, REFRESH_ELEMENT, REFRESH_EVENT, RELEVANT_ATTRIBUTE, REPEAT, REPEAT_ATTRIBUTE, REPEAT_BIND_ATTRIBUTE, REPEAT_ELEMENT, REPEAT_ID_ATTRIBUTE, REPEAT_MODEL_ATTRIBUTE, REPEAT_NODESET_ATTRIBUTE, REPEAT_NUMBER_ATTRIBUTE, REPEAT_STARTINDEX_ATTRIBUTE, REPLACE_ALL, REPLACE_ATTRIBUTE, REPLACE_INSTANCE, REPLACE_NEW, REPLACE_NONE, REQUIRED_ATTRIBUTE, REQUIRED_EVENT, RESET, RESET_ELEMENT, RESET_EVENT, RESOURCE_ATTRIBUTE, RESOURCE_LINKING_ATTR, REVALIDATE, REVALIDATE_ELEMENT, REVALIDATE_EVENT, SCHEMA_ATTRIBUTE, SCHEMA_CONSTRAINTS_ERROR, SCHEMA_ELEMENT, SCROLL_FIRST_EVENT, SCROLL_LAST_EVENT, SECRET, SECRET_ELEMENT, SELECT, SELECT_BOOLEAN_ELEMENT, SELECT_EVENT, SELECT_MANY_ELEMENT, SELECT_ONE_ELEMENT, SELECT1, SELECTED_ATTRIBUTE, SELECTION_ATTRIBUTE, SEND, SEPARATOR_ATTRIBUTE, SET_FOCUS_ELEMENT, SET_INDEX_ELEMENT, SETFOCUS, SETINDEX, SETVALUE, SETVALUE_ELEMENT, SHOW_ATTR, SHOW_ATTRIBUTE, SHOW_NEW, SHOW_REPLACE, SRC_ATTRIBUTE, STANDALONE_ATTRIBUTE, START_ATTRIBUTE, STARTINDEX_ATTRIBUTE, STEP_ATTRIBUTE, SUBMISSION, SUBMISSION_ATTRIBUTE, SUBMIT, SUBMIT_DONE_EVENT, SUBMIT_ELEMENT, SUBMIT_ERROR, SUBMIT_EVENT, SUBMIT_INFO_ATTRIBUTE, SUBMIT_INFO_ELEMENT, SUBMIT_INSTANCE_ELEMENT, SUBMIT_STARTED_EVENT, SUBTREE_MODIFY_END, SUBTREE_MODIFY_START, SWITCH, SWITCH_ELEMENT, TARGET_ATTRIBUTE, TEXTAREA, TEXTAREA_ELEMENT, TOGGLE, TOGGLE_ELEMENT, TRAVERSAL_ERROR, TREE_ELEMENT, TRIGGER, TYPE_ATTRIBUTE, UI_INITIALIZE_EVENT, UPLOAD, UPLOAD_ELEMENT, VALID_EVENT, VALID_PSEUDOCLASS, VALUE, VALUE_ATTRIBUTE, VALUE_CHANGED_EVENT, VALUE_CHANGING_EVENT, VALUE_ELEMENT, VERSION_ATTRIBUTE, XercesPSVIClassName, XFORMS_NS, XFormsConfigurationPSVI, XHTML_NS, XSMILES_MESSAGE_SHOWN_EVENT
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Constructor Summary
DynBoundElementImpl(XFormsElementHandler handler, java.lang.String ns, java.lang.String name)
           
 
Method Summary
 void bindingMaybeDirty()
          the refresh processing notifies, that the binding might have changed, and it needs to be re-evaluated
protected  BindElement checkBindAttribute()
           
 void checkBinding()
          check if my binding has changed
protected  ModelElementImpl checkModelAttribute()
          check that model attribute is sane, if it exists
 void checkStyling()
           
 void checkVisibility()
          This is called when a binding goes to zero nodes
 java.lang.Object clone()
           
 void destroy()
          Destroy this element and its descendants recursively.
protected  void destroyBinding()
           
 InstanceNode evaluateRefNode()
          an utility function for evaluating the ref or nodeset XPath once and returning the result.
protected  BindElementImpl getBind()
           
 short getBindingState()
          returns the current binding state
 int getBindingType()
           
 org.w3c.dom.NodeList getBoundNodeset()
          Search for my reference nodes this is multiple node binding
 java.lang.String getChildText()
          iterate through output and text nodes
 InstanceNode getContextForDescendant()
          an descendant asks for its context
 org.w3c.dom.Node getContextNode()
           
 org.w3c.dom.NodeList getContextNodeList()
           
 InstanceItemListener getInstanceItemListener()
           
 ModelElementImpl getModel()
          get this elements model (look for parents if model attribute not found)
 ModelContext getModelContext()
           
 org.w3c.dom.Node getNamespaceContextNode()
           
protected static ElementWithContext getParentBoundElement(org.w3c.dom.Node start, ElementWithContext refElem)
          Used also by ModelBoundElement.
 java.lang.String getRef()
           
 InstanceNode getRefNode()
           
protected  java.lang.Object getRefNodeValue()
          gets the reference instance node value
 XPathExpr getRefXPathExpr()
           
 java.lang.String getTextWithPrecedence()
          get text: use precedence : refNode, linking attributes, inline text
 XPathExpr getXPath()
          get the XPath string to listen to
 XPathEngine getXPathEngine()
          executes an arbitrary XPath expression
 boolean hasBindingAttributes()
          is this element bound.
protected static boolean isSameModel(ElementWithContext elem1, ElementWithContext elem2)
           
 boolean isSingleNodeBinding()
           
 void notifyBindingChanged(org.w3c.dom.NodeList newBinding)
          notifies the listener that the binding and the value changed
protected  void notifyBindingChangedRecursively(org.w3c.dom.Element elem)
           
 void notifyParentBindingChanged(DynBoundElementImpl ancestor)
          the ancestor may signal thru this method that its binding has changed, and therefore I should renew my context node and binding
 void renewBinding()
          renew my bindings
 void resetContextNode()
          reset my context node
 void setContextNode(InstanceNode node)
           
protected  void setRefNodeValue(java.lang.Object value, boolean valueChanging)
          Sets the reference instance node value
 
Methods inherited from class fi.hut.tml.xsmiles.mlfc.xforms.dom.XFormsElementImpl
debugNode, dispatch, dispatch, dispatchActivateEvent, dispatchClickEvent, dispatchEvent, findFirstRelevantControl, getBrowser, getClassName, getComponentFactory, getId, getModel, getModelId, getModelInScope, getSrc, getStyleAttrValue, getXMLDocument, handleXFormsException, init, initializeXMLEvents, isCSSLayoutDoc, moveNodes, printEvent, removeAllChildren, retrieveInstanceItem, retrieveResourceAsString, serializeNode, setClassName, setHandler, setId, setOwnerDoc
 
Methods inherited from class fi.hut.tml.xsmiles.dom.VisualElementImpl
addView, belongsToTree, getViews, handleEvent, insertBefore, isCurrentlyVisible, isFocusPoint, isPseudoClass, isVisibleByCSSProperties, notifyPseudoRemoved, removeAllViews, removeAttribute, removeChild, replaceChild, setAttribute, setStatus, styleChanged, updateViews
 
Methods inherited from class fi.hut.tml.xsmiles.dom.XSmilesElementImpl
addBinding, addUndistributedChild, clonePseudoElements, cloneSubtree, debugNode, dispatchEventInMainThread, get, getApplyBindingSheets, getAuthorSheets, getChildNodes, getElementStatus, getOriginalClone, getPseudoClass, getResourceReferencer, getRuleNode, getStyle, getText, getText, getUndistributedChildNodes, getXblImplementations, hasBinding, hasStyle, initFinalFlattenedTree, initStyle, isInitedForReset, removeBinding, removeUndistributedChild, replaceNode, resetFinalFlattenedTree, resolveURI, searchElementWithId, searchElementWithId, setApplyBindingSheets, setAuthorSheets, setPseudoClass, setRuleNode, setStyle, updateStyle
 
Methods inherited from class org.apache.xerces.dom.ElementNSImpl
getBaseURI, getLocalName, getNamespaceURI, getPrefix, getTypeName, getTypeNamespace, setPrefix, setType, setValues
 
Methods inherited from class org.apache.xerces.dom.ElementImpl
cloneNode, getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getDefaultAttributes, getElementsByTagName, getElementsByTagNameNS, getNodeName, getNodeType, getSchemaTypeInfo, getTagName, getXercesAttribute, hasAttribute, hasAttributeNS, hasAttributes, isEqualNode, normalize, reconcileDefaultAttributes, removeAttributeNode, removeAttributeNS, setAttributeNode, setAttributeNodeNS, setAttributeNS, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setReadOnly, setupDefaultAttributes, setXercesAttributeNode, synchronizeData
 
Methods inherited from class org.apache.xerces.dom.ParentNode
getChildNodes, getChildNodesUnoptimized, getFirstChild, getLastChild, getLength, getOwnerDocument, getTextContent, hasChildNodes, item, setTextContent, synchronizeChildren
 
Methods inherited from class org.apache.xerces.dom.ChildNode
getNextSibling, getParentNode, getPreviousSibling
 
Methods inherited from class org.apache.xerces.dom.NodeImpl
addEventListener, appendChild, changed, changes, compareDocumentPosition, compareTreePosition, getContainer, getFeature, getNodeNumber, getNodeValue, getReadOnly, getUserData, getUserData, isDefaultNamespace, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, needsSyncChildren, removeEventListener, setNodeValue, setUserData, setUserData, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Element
getAttribute, getAttributeNode, getAttributeNodeNS, getAttributeNS, getElementsByTagName, getElementsByTagNameNS, getTagName, hasAttribute, hasAttributeNS, removeAttribute, removeAttributeNode, removeAttributeNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 
Methods inherited from interface fi.hut.tml.xsmiles.dom.StylableElement
getRuleNode, getStyle, hasStyle, isPseudoClass, setRuleNode, setStyle
 
Methods inherited from interface fi.hut.tml.xsmiles.dom.VisualElement
getStyle
 
Methods inherited from interface fi.hut.tml.xsmiles.dom.PseudoClassController
getPseudoClass, setPseudoClass
 

Field Detail

UNINITIALIZED

public static final short UNINITIALIZED
state: unitialized

See Also:
Constant Field Values

BINDING_ATTRIBUTES_NOT_FOUND

public static final short BINDING_ATTRIBUTES_NOT_FOUND
state: bindind attributes not found

See Also:
Constant Field Values

BOUND_NODE_NOT_FOUND

public static final short BOUND_NODE_NOT_FOUND
state: bound node was not found (non-relevant control)

See Also:
Constant Field Values

BINDING_FAILED

public static final short BINDING_FAILED
state: bindind failed (fatal error)

See Also:
Constant Field Values

BINDING_OK

public static final short BINDING_OK
state: binding ok

See Also:
Constant Field Values

binding_state

protected short binding_state
the current binding state, one of the above


bindingAttributesRequired

protected boolean bindingAttributesRequired
are binding attributes required (e.g. button does not require them


contextNode

protected InstanceNode contextNode
Repeat may set this context node


bind

protected BindElementImpl bind

init

protected boolean init
are we initializing the control


myModel

protected ModelElementImpl myModel
Gets my model element. If not specified using "model" attribute, will look for parent DynBoundElementImpl


refExpr

protected XPathExpr refExpr
Constructor Detail

DynBoundElementImpl

public DynBoundElementImpl(XFormsElementHandler handler,
                           java.lang.String ns,
                           java.lang.String name)
Method Detail

checkModelAttribute

protected ModelElementImpl checkModelAttribute()
                                        throws XFormsBindingException
check that model attribute is sane, if it exists

Throws:
XFormsBindingException

checkBindAttribute

protected BindElement checkBindAttribute()
                                  throws XFormsBindingException
Throws:
XFormsBindingException

getBind

protected BindElementImpl getBind()

getBindingType

public int getBindingType()

bindingMaybeDirty

public void bindingMaybeDirty()
the refresh processing notifies, that the binding might have changed, and it needs to be re-evaluated

Specified by:
bindingMaybeDirty in interface DynamicDependencyListener

resetContextNode

public void resetContextNode()
Description copied from interface: ElementWithContext
reset my context node

Specified by:
resetContextNode in interface ElementWithContext

renewBinding

public void renewBinding()
Description copied from interface: ElementWithContext
renew my bindings

Specified by:
renewBinding in interface ElementWithContext

destroyBinding

protected void destroyBinding()

getBindingState

public short getBindingState()
returns the current binding state

Specified by:
getBindingState in interface ElementWithContext

getBoundNodeset

public org.w3c.dom.NodeList getBoundNodeset()
Search for my reference nodes this is multiple node binding

Specified by:
getBoundNodeset in interface DynamicDependencyListener
Returns:
the currently bound instance nodes in multinode binding

getContextForDescendant

public InstanceNode getContextForDescendant()
Description copied from interface: ElementWithContext
an descendant asks for its context

Specified by:
getContextForDescendant in interface ElementWithContext

destroy

public void destroy()
Description copied from class: XSmilesElementImpl
Destroy this element and its descendants recursively. NOTE: When overriding this method, please be sure to call super.destroy(), otherwise the destroy call will not propagate. NOTE: Actually, the recursion, which destroys the elements should be here, because usually everybody forgets to call super.destroy when overriding, thus causing the destroy sceme to break down.

Specified by:
destroy in interface XFormsElement
Overrides:
destroy in class XSmilesElementImpl

setRefNodeValue

protected void setRefNodeValue(java.lang.Object value,
                               boolean valueChanging)
Sets the reference instance node value


getRefNodeValue

protected java.lang.Object getRefNodeValue()
gets the reference instance node value


getRefNode

public InstanceNode getRefNode()
Specified by:
getRefNode in interface DynamicDependencyListener
Returns:
the currently bound instance node in single node binding

getRef

public java.lang.String getRef()

getParentBoundElement

protected static ElementWithContext getParentBoundElement(org.w3c.dom.Node start,
                                                          ElementWithContext refElem)
Used also by ModelBoundElement.


setContextNode

public void setContextNode(InstanceNode node)

getContextNode

public org.w3c.dom.Node getContextNode()
Specified by:
getContextNode in interface ExpressionContainer
Returns:
the context node for the XPath expression

getXPathEngine

public XPathEngine getXPathEngine()
Description copied from interface: ExpressionContainer
executes an arbitrary XPath expression

Specified by:
getXPathEngine in interface ExpressionContainer

getModel

public ModelElementImpl getModel()
Description copied from interface: ElementWithContext
get this elements model (look for parents if model attribute not found)

Specified by:
getModel in interface ElementWithContext
Overrides:
getModel in class XFormsElementImpl

getModelContext

public ModelContext getModelContext()
Specified by:
getModelContext in interface ExpressionContainer
Returns:
the model context for this expression

getNamespaceContextNode

public org.w3c.dom.Node getNamespaceContextNode()
Specified by:
getNamespaceContextNode in interface ExpressionContainer
Returns:
the namespace context node for the XPath expression

getXPath

public XPathExpr getXPath()
get the XPath string to listen to

Specified by:
getXPath in interface DynamicDependencyListener

isSingleNodeBinding

public boolean isSingleNodeBinding()
Specified by:
isSingleNodeBinding in interface DynamicDependencyListener
Returns:
true if single node binding expression

getRefXPathExpr

public XPathExpr getRefXPathExpr()

checkVisibility

public void checkVisibility()
This is called when a binding goes to zero nodes


checkStyling

public void checkStyling()

notifyBindingChanged

public void notifyBindingChanged(org.w3c.dom.NodeList newBinding)
notifies the listener that the binding and the value changed

Specified by:
notifyBindingChanged in interface DynamicDependencyListener

notifyParentBindingChanged

public void notifyParentBindingChanged(DynBoundElementImpl ancestor)
the ancestor may signal thru this method that its binding has changed, and therefore I should renew my context node and binding

Specified by:
notifyParentBindingChanged in interface ElementWithContext

notifyBindingChangedRecursively

protected void notifyBindingChangedRecursively(org.w3c.dom.Element elem)

isSameModel

protected static boolean isSameModel(ElementWithContext elem1,
                                     ElementWithContext elem2)

getInstanceItemListener

public InstanceItemListener getInstanceItemListener()
Specified by:
getInstanceItemListener in interface DynamicDependencyListener
Returns:
the instanceItemListener for the referred nodes, for value changes without binding change

checkBinding

public void checkBinding()
check if my binding has changed

Specified by:
checkBinding in interface ElementWithContext

hasBindingAttributes

public boolean hasBindingAttributes()
is this element bound. Not all elements are always bound, such as group without ref

Specified by:
hasBindingAttributes in interface ElementWithContext

evaluateRefNode

public InstanceNode evaluateRefNode()
                             throws java.lang.Exception,
                                    org.xml.sax.SAXException
an utility function for evaluating the ref or nodeset XPath once and returning the result. This can be used by elements, who know that they are leaf nodes, and only want to evaluate it once

Throws:
java.lang.Exception
org.xml.sax.SAXException

getTextWithPrecedence

public java.lang.String getTextWithPrecedence()
                                       throws XFormsLinkException
get text: use precedence : refNode, linking attributes, inline text

Specified by:
getTextWithPrecedence in interface ElementWithContext
Throws:
XFormsLinkException

getChildText

public java.lang.String getChildText()
iterate through output and text nodes


getContextNodeList

public org.w3c.dom.NodeList getContextNodeList()
Specified by:
getContextNodeList in interface ExpressionContainer
Returns:
the list of context nodes of this expression

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Overrides:
clone in class XSmilesElementImpl
Throws:
java.lang.CloneNotSupportedException


X-Smiles 1.2