org.eclnt.jsfserver.elements.impl

## Class ROWDYNAMICCONTENTBinding

- java.lang.Object
- - org.eclnt.jsfserver.elements.impl.ROWDYNAMICCONTENTBinding

- All Implemented Interfaces:
    java.io.Serializable, IDynamicContentBindingObject
  Direct Known Subclasses:
    DYNAMICCONTENTBinding

      public class ROWDYNAMICCONTENTBinding
      extends java.lang.Object
      implements java.io.Serializable, IDynamicContentBindingObject

  Object to pass dynamically generated content.
  There are two way to pass the content: as XML string or as component node hierarchy. Use the corresponding methods `setContentXml(String)` or `setContentNodes(List)` to do so.
  The object internally has a counter that is updated every time the content changes. The corresponding component (ROWDYNAMICCONTENT) as result only updates its content is this value changes.
  See Also:
    Serialized Form

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `ROWDYNAMICCONTENTBinding.ActionListenerDelegator`
    `class` | `ROWDYNAMICCONTENTBinding.BoundAttributesMap`
    `static class` | `ROWDYNAMICCONTENTBinding.ComponentAttribute` Representation of an attribute value.
    `static class` | `ROWDYNAMICCONTENTBinding.ComponentAttributeContainer`
    `static class` | `ROWDYNAMICCONTENTBinding.ComponentNode` Representation of a component.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ROWDYNAMICCONTENTBinding()`
    `ROWDYNAMICCONTENTBinding(boolean rebuildOnContentChangeOnly)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected long` | `calculateCounter(java.lang.String s)` This method is called every time there is a change in the ROWDYNAMICCONTENT.
    `java.lang.String` | `findCurrentXML()` Returns ths XML that is currently contained in the dynamic content.
    `java.util.Map` | `getBas()` Internal use!
    `java.util.List<ROWDYNAMICCONTENTBinding.ComponentNode>` | `getContentNodes()`
    `java.lang.String` | `getContentXml()`
    `long` | `getCounter()` Internal use only.
    `void` | `passRuntimeExpression(java.lang.String value)` Internal use only: the component processing (RPWDYNAMICCONTENTComponent) passes at runtime the expression of this instance, so that it can be later on used for creating expressions for bound values.
    `void` | `prepareValueBinding()`
    `void` | `setContentNode(ROWDYNAMICCONTENTBinding.ComponentNode node)` Sets the content, when the content only contains one top node.
    `void` | `setContentNodes(java.util.List<ROWDYNAMICCONTENTBinding.ComponentNode> nodes)` Sets the content of the dynamic content.
    `void` | `setContentXml(java.lang.String xml)` Sets the XML content that is to be rendered within the page.
    `void` | `setCounter(long counter)` In order to save performance a counter is managed within the instance.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ROWDYNAMICCONTENTBinding

          public ROWDYNAMICCONTENTBinding()

    - #### ROWDYNAMICCONTENTBinding

          public ROWDYNAMICCONTENTBinding(boolean rebuildOnContentChangeOnly)

  - ### Method Detail

    - #### setContentXml

          public void setContentXml(java.lang.String xml)

      Sets the XML content that is to be rendered within the page.
      When defining the XML, please note:
      (1.) it is not required to explicity set the id-attribute of components
      (2.) pay attention when assembling the XML - attribute values need to be properly built and must not contain characters like '<','>','&',...
      For normal cases the assembling of dynamic content is much easier done by using the ComponentNode-mechanism (see `setContentNodes(List)`).

    - #### getContentXml

          public java.lang.String getContentXml()

    - #### setContentNode

          public void setContentNode(ROWDYNAMICCONTENTBinding.ComponentNode node)

      Sets the content, when the content only contains one top node.

    - #### setContentNodes

          public void setContentNodes(java.util.List<ROWDYNAMICCONTENTBinding.ComponentNode> nodes)

      Sets the content of the dynamic content. Each node is 1:1 representation of a corresponding XML-element.

    - #### getContentNodes

          public java.util.List<ROWDYNAMICCONTENTBinding.ComponentNode> getContentNodes()

    - #### getCounter

          public long getCounter()

      Internal use only.

    - #### setCounter

          public void setCounter(long counter)

      In order to save performance a counter is managed within the instance. Every time there is some content change, then the counter is updated. There are some situations in which you may want to handle the counter on your own. In this case you can set the counter by using this method. - Please handle this method with great care only! Every time you change the content of the instance, you must make sure, that the counter really gets updated - otherwise there is no update of components.

    - #### findCurrentXML

          public java.lang.String findCurrentXML()

      Returns ths XML that is currently contained in the dynamic content. In case of having filled the dynamic content with `setContentXml(String)` then the xml thas was passed is returned. In case of having filled the content with `setContentNode(ComponentNode)` or with `setContentNodes(List)` then the XML is calculated out of the nodes.

    - #### passRuntimeExpression

          public void passRuntimeExpression(java.lang.String value)

      Internal use only: the component processing (RPWDYNAMICCONTENTComponent) passes at runtime the expression of this instance, so that it can be later on used for creating expressions for bound values.

    - #### prepareValueBinding

          public void prepareValueBinding()

    - #### getBas

          public java.util.Map getBas()

      Internal use!
      Returns the bounds values that are assigend by calling `ComponentNode#bindAttribute(String, Object)`. The list holds the runtime objects that are addressed by expressions.

    - #### calculateCounter

          protected long calculateCounter(java.lang.String s)

      This method is called every time there is a change in the ROWDYNAMICCONTENT. It calculates a counter that represents the content.

Copyright © CaptainCasa Gmbh. All Rights Reserved.