PDA

View Full Version : DominoUI extension



David Grossi
30 Dec 2009, 2:19 AM
Hello,

I'm using the Ext.nd.DominoUI functionality to build the default viewport, but now, I would like to use the left panel to add - for example - a button that will open a view which is not in the initial outline.

The below code is nearly working well : when I click on the button (see the screenshot), it appends a tab containing the desired view... but...
... the documents opened from within this view are not opened as a new tab of the tabpanel.

As I think I've passed the right parameters (viewport, tabPanel, container) to the new Ext.nd.UIView object, I don't see what to do to have these documents opened as a new tab element.

Could you help ?

Here is the code :



Ext.onReady(function() {

nui = new Ext.nd.DominoUI({
uiOutline : {
outlineName: 'Documents'
},
uiView : {
viewName: 'WKF_ByInitiator',
viewTitle: 'WKF by initiator',
count: 50,
showSearch: true
}
});

nav = nui.outlinePanel;
grid = nui.viewContainer;
tab = nui.tabPanel;

var nbutton = new Ext.Button({
text: 'Open another view',
width: 180,
renderTo: 'xnd-outline-panel',

handler: function(){

var myNewView = new Ext.nd.UIView({
viewport: nui.viewport,
container: grid,
tabPanel: tab,

viewName: 'Frais',
count: 30,
renderTo: grid
});

tab.add({
id: 'My new view',
title: 'My new view',
items: myNewView,
closable: true,
layout: 'fit'
})
}
})

});



Post Scriptum : please, note on the screenshot that the total columns add unnecessary decimals with an approximation error. In Lotus Notes, the totals are correct. Is it a well-known bug ?

jratcliff
30 Dec 2009, 8:41 AM
What version of Ext.nd are you using? I believe starting in beta 2 we changed the 'tabPanel' property to 'target' so that you can specifiy any Ext/Ext.nd component as the target where docs would open into and not just tab panels.


So try changing from this:

tabPanel : tab

to this:

target : tab

As for the necessary decimals in the total column, I'll look into that. I though we had that fixed as well but perhaps not.

Jack

David Grossi
30 Dec 2009, 9:37 AM
Hello Jack,

Thank you for your (very) prompt reply.
I'm using the beta 3.
I'll try 'target' to check if it fixes it.

See you soon !

David Grossi
30 Dec 2009, 10:03 AM
Jack,

I've spent a full day on this, and you brought me the solution in 5 minutes.
What can I say ?

Thanks a lot !

About the "decimal strange approximation", I've performed other tests and the problem is easy to reproduce (but maybe not easy to solve !!!)

jratcliff
30 Dec 2009, 10:05 AM
Jack,

I've spent a full day on this, and you brought me the solution in 5 minutes.
What can I say ?

Thanks a lot !

You're welcome. I apologize that you had to spend way too much time on this. When we get the API docs released with the next beta hopefully that will help! :)

David Grossi
30 Dec 2009, 10:12 AM
No problem. I'm used to loose time on technical problems, this is part of my job.

About the "decimal strange approximation", I've performed other tests and the problem is easy to reproduce (but maybe not easy to solve !!!) :-?