Skip to content

Commit 76a1898

Browse files
committed
Correct sysBaseObject.renderObject()
1 parent 394a54e commit 76a1898

1 file changed

Lines changed: 12 additions & 7 deletions

File tree

doc/dev-oop-classes.rst

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,15 @@ description of its functionality:
108108
********************
109109

110110
1. DOM Object ID Generation:
111-
The method generates a unique DOMObjectID for the object based on its ObjectID and an optional Prefix.
111+
The method generates a unique DOMObjectID for the object based on its ObjectID and an optional ``Prefix``.
112112
If overrideDOMObjectID is true, the ObjectID is used directly as the DOMObjectID.
113+
The optional ``Prefix`` should only be used internally on recursion, not as *outside* call.
113114

114115
2. Conditional Rendering:
115116
Ensures that the object is rendered only if its corresponding DOM element does not already exist.
116117

117118
3. DOM Element Creation and Configuration:
118-
- Creates the required DOM element using createDOMElement() and appends it to the parent DOM element through appendDOMParentElement().
119+
- Creates the required DOM element using ``createDOMElement()`` and appends it to the parent DOM element through ``appendDOMParentElement()``.
119120
- Configures the DOM element by setting attributes, values, styles, and visibility using various helper methods:
120121
* setDOMAttributes()
121122
* setDOMElementValue()
@@ -140,13 +141,17 @@ description of its functionality:
140141

141142
.. code-block:: javascript
142143
143-
const parentObject = new sysBaseObject();
144-
const childObject = new sysBaseObject();
144+
var Object1 = new sysBaseObject();
145+
Object1.ObjectID = 'BaseObject';
145146
146-
parentObject.addObject(childObject);
147-
parentObject.renderObject('parentDOM');
147+
var childObject = new sysBaseObject();
148+
Object1.addObject(childObject);
149+
//- Now Object1.ChildObjects[0] = childObjectRef
148150
149-
... ...
151+
Object1.renderObject();
152+
//- this.createDOMElement(this.DOMObjectID);
153+
//- this.appendDOMParentElement();
154+
//- => recursive renders 2 DOM divs
150155
151156
22.2.5. Conclusion
152157
******************

0 commit comments

Comments
 (0)