The problem is that, while the forms do appear, they appear without data until you click the tabs. Then the forms of the other types will not appear. It seems like Servoy isn't updating the UI somehow. I've tried updateUI and everything else I can think of and no luck. Here's the code:
In the table (upper component) I have an onRecordSelected global method as follows:
//redirects to set the detail pane to the correct form depending on selected record
- Code: Select all
args = forms.mod_eqt_table.tree_node_type; //the selected type is set here
forms.mod_eqt_main.setCorrectPane(args); //calls the method to configure the detail pane with the correct form for the record type needed
Here's the code for the setCorrectPane:
- Code: Select all
//switch the lower splitpane components
var node_type = arguments[0]; //the node type from the global
switch( node_type ){
case 'folder' :
elements.details.visible = false;
elements.detailsStock.visible = false;
elements.detailsFolder.visible = true;
elements.bean_right.bottomComponent = elements.detailsFolder;
elements.bean_right.dividerLocation = 230;
break;
case 'component' :
elements.detailsFolder.visible = false;
elements.detailsStock.visible = false;
elements.details.visible = true;
elements.bean_right.bottomComponent = elements.details;
elements.bean_right.dividerLocation = 230;
break;
case 'stock' :
elements.detailsFolder.visible = false;
elements.details.visible = false;
elements.detailsStock.visible = true;
elements.bean_right.bottomComponent = elements.detailsStock;
elements.bean_right.dividerLocation = 230;
break;
}