component_class
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
component_class [2023/08/15 11:48] – sahl | component_class [2023/08/15 11:49] (current) – sahl | ||
---|---|---|---|
Line 336: | Line 336: | ||
In this case everyone can replay the Ajax redraw request and see the content of the component. | In this case everyone can replay the Ajax redraw request and see the content of the component. | ||
- | ==== Extending the component javascript class ==== | + | ===== Extending the component javascript class ===== |
If you want to extend the javascript object associated with your custom component, this can be done in three easy steps. | If you want to extend the javascript object associated with your custom component, this can be done in three easy steps. | ||
- | === 1. Give the component an unique class name === | + | ==== 1. Give the component an unique class name ==== |
You first need to give your component a unique DOM class name, which is accomplished by overwriting the '' | You first need to give your component a unique DOM class name, which is accomplished by overwriting the '' | ||
Line 348: | Line 348: | ||
</ | </ | ||
- | === 2. Create a new javascript class for your component === | + | ==== 2. Create a new javascript class for your component |
Now create a new javascript class for your component. It must extend the Platform.Component class: | Now create a new javascript class for your component. It must extend the Platform.Component class: | ||
Line 359: | Line 359: | ||
</ | </ | ||
- | === 3. Associate the DOM class with the javascript class === | + | ==== 3. Associate the DOM class with the javascript class ==== |
This is done like this in javascript: | This is done like this in javascript: |
component_class.1692100120.txt.gz · Last modified: 2023/08/15 11:48 by sahl