tapestry. event

Utility functions that handle converting javascript event objects into a name/value pair format that can be sent to the remote server.

Summary
tapestry. eventUtility functions that handle converting javascript event objects into a name/value pair format that can be sent to the remote server.
Functions
buildEventPropertiesTakes an incoming browser generated event (like key/mouse events) and creates a js object holding the basic values of the event in order for it to be submitted to the server.
buildTargetPropertiesGeneric function to build a properties object populated with relevent target data.
buildNodePropertiesBuilds needed target node properties, like the node’s id.

Functions

buildEventProperties

buildEventProperties:function(event,
props)

Takes an incoming browser generated event (like key/mouse events) and creates a js object holding the basic values of the event in order for it to be submitted to the server.

Parameters

eventThe javascript event method is based on, if it isn’t a valid browser event it will be ignored.
propsThe existing property object to set the values on, if it doesn’t exist one will be created.  Returns:

The desired event properties bound to an object.  Ie obj.target,obj.charCode, etc..

buildTargetProperties

buildTargetProperties:function(props,
target)

Generic function to build a properties object populated with relevent target data.

Parameters

propsThe object that event properties are being set on to return to the server.
targetThe javscript Event.target object that the original event was targeted for.

Returns

The original props object passed in, populated with any data found.

buildNodeProperties

buildNodeProperties:function(props,
node)

Builds needed target node properties, like the node’s id.

Parameters

propsThe object that event properties are being set on to return to the server.
nodeThe dom node specified as the Event.target in a javascript event.
buildEventProperties:function(event,
props)
Takes an incoming browser generated event (like key/mouse events) and creates a js object holding the basic values of the event in order for it to be submitted to the server.
buildTargetProperties:function(props,
target)
Generic function to build a properties object populated with relevent target data.
buildNodeProperties:function(props,
node)
Builds needed target node properties, like the node’s id.