Form doesn't show in split pane

Questions and answers on developing, deploying and using plugins and JavaBeans

Form doesn't show in split pane

Postby bobcart » Tue Mar 01, 2005 2:05 am

I have a form using splitpanes with an upper and lower component. The upper component contains a form that is just a table of records. The lower component contains one of several forms which are loaded based on the type of record selected in the upper component. This is all from the same table. This structure allows me to dynamically show the right form in the lower component for whatever record type appears above.

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;
}
bobcart
 
Posts: 214
Joined: Fri Nov 21, 2003 8:01 pm
Location: Melbourne (AUS)

Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 34 guests