PDA

View Full Version : Compose Document



captainm1uk
15 Oct 2007, 2:22 AM
I now have the action bar in a view. If I use the standard @Command([Compose];"SampleForm") when I click this I get page cannot be found but in the url it says http://your server/your database.nsf/formname?openform

Where is this parameter configured?

Also If I want to open the doc in a new tab in the center frame, how can this be done

Thanks

tarikonen
16 Oct 2007, 2:49 AM
I don't know if you intended this..



var link = "/gesprobank.nsf/Progetto?openform";
var center = parent.GesProBankApp.ui.layout.getRegion('center');
var iframe = parent.Ext.DomHelper.append(parent.document.body, {tag: 'iframe', frameBorder: 0, src: link});
var panel = new Ext.ContentPanel(iframe, {title: 'Document', closable: true, fitToFrame : true});
parent.GesProBankApp.ui.layout.add('center',panel);
center.showPanel(panel)


however this script, to insert in an action of a view, it allows to create a new document...

captainm1uk
16 Oct 2007, 3:33 AM
Hi

Thanks for this but the GesProBankApp.ui is a custom library right - I am using the library held in extnd/extnd-all

How would i access this

tarikonen
16 Oct 2007, 4:28 AM
No, GesProBankApp is the name that you use when you build the layout. In the example Db you have main.html page that have in js Header some lines of code like this



var AppName (in my case GesProBankApp) = function()
{
init:....
}


If you want more details send me a pm.
bye

captainm1uk
16 Oct 2007, 4:59 AM
Perfect....

Many thanks - works a treat

Episode1
10 Jan 2008, 1:15 AM
Hello,

any idea why this does not work when I initialize my ui with $$ViewTemplateDefault ? I thought that I only had to replace the AppName object with ViewTemplateDefault, but I get an error 'parent.ViewTemplateDefault.ui is null or no object' ...

captainm1uk
10 Jan 2008, 7:05 AM
Have you used the mailpage.html instead and place all your code in there ?

RWaters
10 Jan 2008, 9:34 AM
Hello,

any idea why this does not work when I initialize my ui with $$ViewTemplateDefault ? I thought that I only had to replace the AppName object with ViewTemplateDefault, but I get an error 'parent.ViewTemplateDefault.ui is null or no object' ...

Ugh, I need to sticky this issue or something....

There's a known bug with ViewTemplateDefault. In the HTML Head change the line:


var ui = new Ext.nd.DominoUI

to:


this.ui = new Ext.nd.DominoUI