| CCXML 1.0-W3C Development Guide | Home | Frameset Home |
|
<createcall>
<!-- declaring a user variable -->
<var name="author" expr="'matthew henry'"/>
<log expr="'***** AUTHOR = ' + author"/>
<!-- assigning the user variable Application scope -->
<assign name="application.author" expr="'steve sax'"/>
<log expr="'***** AUTHOR = ' + author"/>
<log expr="'***** APPLICATION.AUTHOR = ' + application.author"/>
<!-- declaring a new Object -->
<var name="application.myObject" expr="new Object()"/>
<!-- assigning application scoped properties to the Object -->
<assign name="application.myObject.prop1" expr="'rob green'"/>
<assign name="application.myObject.prop2" expr="'eric simpson'"/>
<log expr="'***** APPLICATION.MYOBJECT.PROP1 = ' + application.myObject.prop1"/>
<log expr="'***** APPLICATION.MYOBJECT.PROP2 = ' + application.myObject.prop2"/>
| ANNOTATIONS: EXISTING POSTS |
rqualis
|
|
| I am pretty new to CCXML. As I learn it, I found it, at times, helpful to relate it back to the various programming languages I am very familiar with. In this case, JavaScript:
For those that are familiar with JavaScript, the creating, assigning and accessing of application scope properties as in <assign name="application.myObject.prop1" expr="'rob green'"/> is pretty much the same: The above in JavaScript would be: this.myObject = new Object(); this.myObject.firstname="rich"; document.write(this.myObject.firstname); As you know, the this is the instance of the object at hand (object in the application). For session variable, seems the same behavior as in a J2EE application running in a container. |
| login |
|