we are starting to port our code to v4.5 and I found that the overridden RenderJS method in my tree is not getting executed, so did I miss something on how to register custom js code containing the functions that are called when clicking on a treenode?
You need to create Unique JS Functions for a tree and for the actions you nmeed to specify The Javascript function in the JSSource property and then call that function by implementing the JSFunctionName property.
If you are using Node action yes. Otherwise only make sure that your Javascript method is unique. Below an example how I Use it in my TaskScheduler package
///<summary>
/// Create Javascript element that provides functionality to display the page
Sorry, I mixed up actions, that are executed through context menu and the node.Action assigned to the node created in the Render method. Plus the RenderJS was not executed, which was due to a code snippet I copied from the source and which had several integrity checks on properties I don't need.
Sry for that. But thanks for clarification on differences between 4.0.x and 4.5+.
Custom tree and node actions
Hi,
we are starting to port our code to v4.5 and I found that the overridden RenderJS method in my tree is not getting executed, so did I miss something on how to register custom js code containing the functions that are called when clicking on a treenode?
Thanks,
atze
Hi,
You need to create Unique JS Functions for a tree and for the actions you nmeed to specify The Javascript function in the JSSource property and then call that function by implementing the JSFunctionName property.
This didn't work in 4.0. I've blogged about this a few months back
When you are developing the tree and want to test it you have to log out and login again to get the tree to render.
Hope this helps you,
Richard
So I get you right that I need to create completely custom actions for my tree, right?
You have to create unique Javascript methods yes.
Sorry, I lack a little sleep ;) So, to create those unique JS methods, I need to implement my custom actions using the IAction interface?
If you are using Node action yes. Otherwise only make sure that your Javascript method is unique. Below an example how I Use it in my TaskScheduler package
Sorry, I mixed up actions, that are executed through context menu and the node.Action assigned to the node created in the Render method. Plus the RenderJS was not executed, which was due to a code snippet I copied from the source and which had several integrity checks on properties I don't need.
Sry for that. But thanks for clarification on differences between 4.0.x and 4.5+.
is working on a reply...