Salesforce

How Do I Respond to any Expand/Collapse Activity Performed on the Tree Control By the End User? (Magic xpa 2.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Respond to any Expand/Collapse Activity Performed on the Tree Control By the End User? (Magic xpa 2.x)

Sometimes you may want to perform an action only when a certain node is expanded or collapsed. For example, you might want to run a task to create a subtotal that will be visible to the user. Or, you might want to create the child nodes at runtime; using a memory table for the tree, you can display customized data on each node.

To do this, you use the Expand Node and Collapse Node Events as Logic units.

Capturing the collapse and expand events


  1. Press Ctrl+H to create a logic unit.

  2. Type E for Event, then select the Internal Event Expand Node or Collapse Node.

  3. You will see a dialog box, “Create Parameter variables to match parameters to the event?”. Click the Yes button if you want the Tree Node Level and Tree Node Value variables to be created for you.

  4. Now, you have a handler that will execute when the user expands or collapses the node. You can ascertain the node level and value by using the parameter variables in the handler.

  5. In the Event Properties, set Propagate to Yes, otherwise this handler will trap the event and the node will not collapse or expand.

See also

The Online and Rich Client Samples projects (program TR13 and RTR13)

Reference
Attachment 
Attachment