Show Contents List
You are here:

14.5.3 Interacting with the component

The myPart JavaScript variable can now be accessed using the LANSA JavaScript singleton:
Properties are accessible via the LANSA.setProperty and LANSA.getProperty functions.
LANSA.setProperty( myPart, "\[PROPERTY\]", "\[Value\]" );
\[PROPERTY\] is the name of the property and must be uppercase.
\[Value\] is the value of the property to be set.
Methods are accessed via the LANSA.invokeMethod function:
LANSA.invokeMethod( myPart, "\[METHOD\]", \{ "\[MAP\]" : "\[value\]", "\[MAP\]" : "\[value\]" \} );
\[METHOD\] is the name of the method and must be uppercase.
\[MAP\] is the name of the Define_Map and must be uppercase.
\[Value\] is the value being passed in to the method.
Events in RDMLX can also be hooked up:
You can add an Event Handler to the LANSA singleton and use an anonymous function to perform some processing.
LANSA.addEventHandler( myPart, "\[EVENT\]", function( sender, parms )
\{ 
    var parameter = parms\["\[MAP\]"\];
\});
\[EVENT\] is the name of the event and must be uppercase.
\[MAP\] is the name of the Define_Map and must be uppercase.
[<span style="color: #0000ee"><span style="text-decoration: underline; ">Show Contents List</span></span>|../../index.htm#lansa/vlwebeng02_0070.htm]