Class ROWDYNAMICCONTENTBinding

java.lang.Object
org.eclnt.jsfserver.elements.impl.ROWDYNAMICCONTENTBinding
All Implemented Interfaces:
Serializable, IDynamicContentBindingObject
Direct Known Subclasses:
DYNAMICCONTENTBinding

public class ROWDYNAMICCONTENTBinding extends Object implements 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:
  • Constructor Details

    • ROWDYNAMICCONTENTBinding

      public ROWDYNAMICCONTENTBinding()
    • ROWDYNAMICCONTENTBinding

      public ROWDYNAMICCONTENTBinding(boolean rebuildOnContentChangeOnly)
  • Method Details

    • setContentXml

      public void setContentXml(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 String getContentXml()
    • setContentNode

      public void setContentNode(ROWDYNAMICCONTENTBinding.ComponentNode node)
      Sets the content, when the content only contains one top node.
    • setContentNodes

      public void setContentNodes(List<ROWDYNAMICCONTENTBinding.ComponentNode> nodes)
      Sets the content of the dynamic content. Each node is 1:1 representation of a corresponding XML-element.
    • getContentNodes

      public 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 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(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 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(String s)
      This method is called every time there is a change in the ROWDYNAMICCONTENT. It calculates a counter that represents the content.