Hi Johann
Two uncertainties remain: What do you mean exactly by visible and what is your blueprint technically?
Below is my code in more detail. The code is used to create the (body) footer with a button to get the reports menu and appears everytime a menu is selected. A menu can of course be selected many times. The relevant code looks (shortened) like this:
Code of the menu selection (a big case stmt). The menu 801 for example is in domain SCHULE > Fachpersonen (I added a screenshot as an aid to read the code)
- Code: Select all
function handleMenuSelected()
{
/*
Title: The form will be shown. Register at domains form.
Author: Birgit Rieder, Robert Huber
Created: 19.07.2007
Modified: 05.08.2008, hu: Default form for find mode for each menu added, stored in form variable this.defaultForm.
06.10.2008, hu: Menu sequence changed to Kanti-Feedback.
Arguments: -
Returns: -
Notes: -
*/
var menuId = forms.BasConfiguration.getConfiguration().selectedMenuId;
// Save the divider location for the main form and the last menu id:
var dividerLocation = elements.vSplit.dividerLocation;
forms.BasConfiguration.getConfiguration().setMainDividerLocation(dividerLocation); // Saves location and previous selected menu id
// Save the divider locations for all the forms showed.
forms.BasConfiguration.saveDividerLocationForFormName(elements.tabSelection.getTabFormNameAt(1));
forms.BasConfiguration.saveDividerLocationForFormName(elements.tabDetail.getTabFormNameAt(1));
elements.tabSelection.removeAllTabs();
elements.tabDetail.removeAllTabs();
elements.vSplit.leftComponent = elements.tabSelection; // Restore 1st tabpanel assignment in case it has been set to null
this.findForms = new Array(); // Forms to set into find mode when a find (Cmd-F) is done
switch(menuId)
{
...
case 801:
globals.createTabSelectionFooter('ScoSubjects', 0, 36);
globals.createTabDetailFooter('ScoPersonsCapabilities', 0, 682);
elements.tabSelection.addTab(forms.ScoSubjects, null, null, null, null, null, null);
elements.tabDetail.addTab(forms.ScoPersonsCapabilities, null, null, null, null, null, null);
break;
...
}
Everytime, menu "801" is selected, the method globals.createTabSelectionFooter() is called (beside the other methods). The mothod looks like:
- Code: Select all
function createTabSelectionFooter()
{
/*
Title: The background image will be dynamically created with the solution model.
Author: Robert Huber
Created: 01.09.2009
Modified: -
Arguments: String : Form to create footer part
Integer : x position of button
Integer : y position of button
Returns: -
Notes: The gradient background image paneFooterGradientBG.png will be appended to the right of existing buttons
*/
var formName = arguments[0];
var btnPosX = arguments[1];
var btnPosY = arguments[2];
// Remove form from history first to get a pre runtime state to add elements with the solution model to it (witout getting stale forms detected error)
history.removeForm(formName); // Works!
//solutionModel.removeForm(); // Doesn't work
// Add background image paneFooterGradientBG.png to footer part
var form = solutionModel.getForm(formName); // Get form to add footer element to
var paneFooter = form.newLabel(null, btnPosX, btnPosY, 220, 18);
// Set properties for pane footer (gradient) graphic
paneFooter.name = 'paneFooter';
paneFooter.styleClass = 'Default';
paneFooter.borderType = 'EmptyBorder, 0, 0, 0, 0';
paneFooter.imageMedia = solutionModel.getMedia('paneFooterGradientBG.png');
paneFooter.mediaOptions = SM_MEDIAOPTION.ENLARGE;
paneFooter.anchors = SM_ANCHOR.WEST | SM_ANCHOR.SOUTH | SM_ANCHOR.EAST;
paneFooter.showClick = false;
paneFooter.showFocus = false;
}
So I still don't understand exactly why one works and the other doesn't.
Regards, Robert