View Full Version : tab
Fredric Berling
7 Sep 2007, 2:32 AM
This is an excellent approach. I like it alot.
I tested it on an existing application and i onlu have one question..
My view does not show up as tabs in the interface. Everytime i click a view in the outline it just opens.... or is that as designed...no tabs (panes)?
RWaters
7 Sep 2007, 5:26 AM
the default openDocument handler will look to see if the layout has been created, if for some reason it can't get a handle on the center region to open a tab then it opens the document in a new window.
Are you using a page and creating a new DominoUI object?
Fredric Berling
14 Sep 2007, 6:30 AM
As i understand you can only view one view at a time from the outline. Documents is opened like separete tabs..The first tab is always the currently opened view.
Where do i find examples of how to close a given tab from a WQS-agent? ...I am saving a newly created document and wants the tab to close when i save.
..or examples in general.. im a beginner in EXT...so bare with me...or tell me to shut up. :)
mth96a
14 Sep 2007, 7:35 AM
// get the active panel
var panel = false;
try {
panel = parent.DemoApp.ui.layout.getRegion('center').getActivePanel();
}catch(e) {
// do nothing
}
// remove active panel
if (panel) {
parent.DemoApp.ui.layout.getRegion('center').remove(panel);
} else {
window.close();
}
Fredric Berling
18 Sep 2007, 3:30 AM
// get the active panel
var panel = false;
try {
panel = parent.DemoApp.ui.layout.getRegion('center').getActivePanel();
}catch(e) {
// do nothing
}
// remove active panel
if (panel) {
parent.DemoApp.ui.layout.getRegion('center').remove(panel);
} else {
window.close();
}
This code doest work in the demodatabase for Alpha1 R2. Im using the standard $$VievTemplateDefault where the layout is created with DominoUI.
To get it to work i had to change the row
var ui = new Ext.nd.DominoUI({
to
this.ui = new Ext.nd.DominoUI({
to be able to reference it properly. (also the DemoApp changed to ViewTemplateDefault ofcourse)
My WQS agent now ends with this cod ethat closes the tab as i wanted THANKS!!:
Print |Content-Type:text/plain|
Print |Content-Type:text/html|
Print "<html>" + Chr(13) + Chr(10)
Print "<head>" + Chr(13) + Chr(10)
Print "</head>" + Chr(13) + Chr(10)
Print "<body>" + Chr(13) + Chr(10)
Print |<Script>
var panel = false;
try {
panel = parent.ViewTemplateDefault.ui.layout.getRegion('center').getActivePanel();
}catch(e) {
}
if (panel) {
parent.ViewTemplateDefault.ui.layout.getRegion('center').remove(panel);
} else {
window.close();
}
</Script></Body>|
Print "</html>" + Chr(13) + Chr(10)
bhaidaya
18 Sep 2007, 7:30 AM
You can close the panel by it's id too... i think extnd uses the documents unique id as the panel id. So something like ".getPanel(unid)" instead of ".getActivePanel()"
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.