Mathijs
September 5, 2011, 7:46am
#1
Hi
I’m using the Dataprocessor for Coldfusion.
I’m trying to add the processUID field userdata to a tree using a beforerender function.
When I do this i want to access that value in the front-end using this code:
tree.attachEvent("onClick",function(id){
var userData = tree.getUserData(id,'processUID');
GetItem(userData);
return true;
})
But the onClick event gives me a “Undefined”
What am i doing wrong here?
Hi. There was one bug detected with this feature. To make it working - move the attached cfc file into the codebase folder.
To set user data you have to call function “set_userdata” but not set_value. Here is the sample how it will work:
<cffunction name="TypeHighlight">
<cfargument name="data">
<cfset ARGUMENTS.data.set_userdata("processUID","SOME DATA")>
</cffunction>
<cfset tree.event.attach("beforeRender",TypeHighlight)>
TreeDataItem.zip (1.49 KB)
Mathijs
October 11, 2011, 6:29pm
#4
fantastic, it works now! thank a lot!