DO NOT EDIT THE CONTENT OF THIS PAGE DIRECTLY (EXCEPT INSIDE THE DIV BELOW WITH ID=DESCRIPTION), UNLESS YOU KNOW WHAT YOU'RE DOING. THE STRUCTURE OF THE CONTENT IS VITAL IN BEING ABLE TO AUTO UPDATE THE CONTENT THROUGH THE DOC GENERATOR.
// A client design method that handles ondrag
if (event.getType() == JSEvent.ONDRAG)
{
// the data is the selected elements array
var elements = event.data;
// only start a client design drag when there is 1 element
if (elements.length == 1)
{
return true;
}
}
// code for a data drag method
event.data = "drag me!";
return DRAGNDROP.COPY;
// code for a data drop method
var data = event.data;
elemements[event.getElementName()].setText(data);
return true;
returns the source component/element of the event. If it has a name the getElementName() is the name of this component.
Table Row (tr)
id
ret
Table Cell (td)
Returns
Div
class
sIndent
Object - an Object representing the source of this event.
Table Row (tr)
id
sam
Table Cell (td)
Sample
Div
class
sIndent
Code Block
language
javascript
// cast to runtime text field (change to anoter kind of type if you know the type)
/** @type {RuntimeTextField} */
var source = event.getSource();
var sourceDataProvider = source.getDataProviderID();
Returns the x position of the event, relative to the component that fired it, if applicable. For example drag'n'drop events will set the x,y positions.
Returns the y position of the event, relative to the component that fired it, if applicable. For example drag'n'drop events will set the x,y positions.