MultiValue Quick Start Tutorial
Hiding, Displaying, and Loading Data into the Form
[Home] [Back] [Next]
InterSystems: The power behind what matters   

We want the form component to display the following behavior:

Remember that the tablePane component on PersonPage.cls already contains the following attributes:
onselectrow ="zenPage.displayForm(zenThis);"
Note the following about this code:
Add the following JavaScript event-handling function to PersonPage.cls. The function executes when the user selects a row on the tablePane. Be sure to place the method out-side of the XDATA Contents or XDATA Style blocks.
ClientMethod displayForm(table) [ Language = javascript ]
 //retrieve id column of selected row
 var id = table.getValue();
 //set controller to selected person
 var controller = zenPage.getComponentById('personData');
 //display form 
 var contactFormGroup=zenPage.getComponentById('personForm');
Note the following about this code:
To learn more about zenPage and zenThis as well as other special variables, read Zen Special Variables in the Zen Application Programming section of Developing Zen Applications.

Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA