Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Layout for Domino developers

  1. #1
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166

    Default Layout for Domino developers

    Hi, I trying migrate from 0.40 to 1.0 Alfa (Rev 8), I have this inical problems/notes:

    Posible bugs/notes Layout (IE6),

    - stuck.gif is present image directory but not use in ext-all.css

    - layout regions not save sizes width/height by cookies. Collapse/Expand state OK.

    - When you click in stick button (in my case in east region) the collapse button stopped in over state.

    - layout-sprite.gif from 0.40 dissapears => Now are collapse.gif, expand.gif, ns-collapse.gif, ns-expand.gif, panel-close.gif

    - I use Domino web server. I create a normal borderlayout but when preview in web, window status bar says: "(Quedan 1 elemento) Descargando datos http://0/..." with IE6 in FF OK. I work offline. I dont understand what is the problem!!!! This borderlayout works fine in Local mode and in FF.


    Thanks Jack your job is awesome,

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    117

    Default

    I have the same problem with http://0/ with IE6 and domino...
    Works fine ni FireFox...

    Keep up the good work, Jack

  3. #3

    Default

    I too see the http://0.0.0.0 issue (IE7 / Domino - only noticed it as I'm behind an authenticating proxy).

  4. #4
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854

    Default

    I've see this too - it's not related to domino. It seems to happen in IE6, but not IE7 or FF. The status bar shows downloading items 3, then 2. When it gets to the last item to download it shows '(1 item remaining) downloading data http://0/...' and hangs. It's not consistent, but it happens from the HelloWorld dialog example http://www.yui-ext.com/deploy/ext-1....log/hello.html

  5. #5

    Default

    Quote Originally Posted by tryanDLS
    I've see this too - it's not related to domino. It seems to happen in IE6, but not IE7 or FF. The status bar shows downloading items 3, then 2. When it gets to the last item to download it shows '(1 item remaining) downloading data http://0/...' and hangs. It's not consistent, but it happens from the HelloWorld dialog example http://www.yui-ext.com/deploy/ext-1....log/hello.html
    I definitely see the problem with IE7 too - I run the Microsoft Fiddler debugging proxy, and see a request to 0.0.0.0 directly after ext-all.js is retrieved.

    Here's part of the log:


  6. #6
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166

    Default more info...

    The error is in ext-all.js but that is not advance much. I will continue proving with the following revisions. This it is the first step to migrate my application and I already have problems .

    If somebody is working with EXT and IDomino I would like interchange ideas. I use DominoXMLDataModel.js to work with grid with incredibly fast results with 50000 documents, I hope that the change to new grid does not suppose much problem with that.

    Also work with DominoUIOutLine.js to obtain precious tree Web from a Notes client Outline without work. OutLine works fine with Ext 1.0.

    Sorry for my English.

  7. #7
    Ext User
    Join Date
    Mar 2007
    Posts
    90

    Default

    Please post your datamodels js here if you are willing - there are a few Notes/Domino people here and we would love to see.

    Jack Ratcliff has done some great work in his Domino Web Tools Project over on OpenNTF.org: http://www.openntf.org/Projects/pmt....D?OpenDocument . He's in release mode :-)

    Cheers,
    Peter

  8. #8
    Sencha User
    Join Date
    Mar 2007
    Posts
    117

    Default

    I use Jack Ratcliffs idea how to create an outline. But I rather create a new TreeLoader than creating a completly new tree object. It can be used in the same way as Ext.tree.TreeLoader.

    Code:
    Domino.OutlineTreeLoader = function(config){
        this.baseParams = {};
        this.requestMethod = 'GET';
        Ext.apply(this, config);
        
        this.events = {
            'beforeload' : true,
            'load' : true,
            'loadexception' : true  
        };
    };
    
    Ext.extend(Domino.OutlineTreeLoader, Ext.tree.TreeLoader, {
       
    	processResponse : function(response, node, callback){
    		var xml = response.responseXML;
    		try {
                
    			var arEntries = xml.getElementsByTagName('outlineentry');
    			var curNode = null;
    			var arNodes = [];
    
    			for (var i=0; i<arEntries.length; i++) {
    
    				var entry = arEntries.item(i);
    			
    				var nodeType = entry.attributes.getNamedItem('type').value;
    				var nodeTitle = entry.attributes.getNamedItem('title').value;
    			
    				var tmpHref = entry.attributes.getNamedItem('url');
    				var nodeHref = (tmpHref) ? tmpHref.value : "";
    					
    				var tmpIcon = entry.attributes.getNamedItem('icon');
    				var nodeIcon = (tmpIcon) ? tmpIcon.value : "";
    			
    				var curPosition = entry.attributes.getNamedItem('position').value;
    			
    				var expandable = entry.attributes.getNamedItem('expandable');
    				var isExpandable = (expandable) ? true : false;
    		
    				var cls;				
    				switch (nodeType) {
    					// section
    					case "0" :
    						cls = (isExpandable) ? "folder" : "file";
    						break;
    					// view
    					case "2" :
    						cls = "file";
    						break;
    					// folder
    					case "20" :
    						cls = "folder";
    						break;
    					default :
    						cls = "file";
    				};
    						
    				var curNode = new Ext.tree.TreeNode({
    					text : nodeTitle, 
    					cls : cls, 
    					allowDrag : true, 
    					isTarget : true,
    					leaf : false,
    					outlineHref : nodeHref,
    					outlineType : nodeType,
    					expandable: isExpandable,
    					position : curPosition,
    					icon : nodeIcon
    				});	
    	
    				arNodes[curPosition] = curNode;
    		
    				if (curPosition.indexOf('.') > 0) {
    					var parentPosition = curPosition.substring(0,curPosition.lastIndexOf('.'));
    					arNodes[parentPosition].appendChild(curNode);	
    				} else {	
    					node.appendChild(curNode);
    				}
    			}
                
    			if(typeof callback == 'function'){
                	    callback(this, node);
    	            }	
    		}catch(e){
                	this.handleFailure(response);
    		}
    	},
        
    	createNode : function(attr) {
    		alert('This method is deprecated!');
        	}
    });
    // Johan

  9. #9
    Sencha User jack.slocum's Avatar
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    6,956

    Default

    I have proposed fix for the //0 problem. Can one of you Domino guys having the problem replace /'+'/0 (should be easy to search for) with /'+'/: and let me know if it fixes the problem? Thanks.

  10. #10
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166

    Default OK

    Hi jack,

    With change works fine (exta-all.js line 18 ):

    Code:
    Ext.EventManager=function(){var _1;var _2;var _3=false;var _4;var _5;var E=YAHOO.util.Event;var D=YAHOO.util.Dom;var _8=function(){if(!_3){_3=true;if(_2){clearInterval(_2);}if(_1){_1.fire();_1.clearListeners();}}};var _9=function(){_1=new Ext.util.Event();if(document.addEventListener){E.on(document,"DOMContentLoaded",_8);}else{if(Ext.isIE){document.write("<s"+"cript id=\"ie-deferred-loader\" defer=\"defer\" src=\"/"+"/\"></s"+"cript>");
    You fix in next release or with this change is fixed?

    About the other thing??? - layout regions not save sizes width/height by cookies but Collapse/Expand state works fine. ???

    DominoOutline.js: I have taken it of dwt - Domino Web tools project. But I have made it independent to have it in js aside. Thanks Jack Ratcliff.

    Code:
    DominoUIOutline = function(config) {
    	Ext.apply(this,config);
    	this.init();
    };
    
    DominoUIOutline.prototype.init = function() {
    	YAHOO.util.Connect.asyncRequest('POST', this.outlineUrl + '?ReadEntries', {
    		success : this.init2.createDelegate(this), 
    		failure : this.init2.createDelegate(this)
    	}, null);
    };
    		
    DominoUIOutline.prototype.init2 = function(o) {
    	var response = o.responseXML;
    	var arEntries = response.getElementsByTagName('outlineentry');
    
    	var Tree = Ext.tree;
    	var tree = new Tree.TreePanel(this.outlinePanel.getEl(), {
    		animate : true, 
    		containerScroll : true,
    		dropConfig : {appendOnly : true},
    		rootVisible : false
    	});
    
    	var root = new Tree.TreeNode({
    		text : 'domino-folders', 
    		draggable : false, 
    		id : 'domino-folders'
    	});
    	tree.setRootNode(root);
    	var curNode = null;
    	var arNodes = [];
    	for (var i=0; i<arEntries.length; i++) {
    		var entry = arEntries.item(i);
    		var dwtType = entry.attributes.getNamedItem('type').value;
    		var dwtTitle = entry.attributes.getNamedItem('title').value;
    		var tmpdwtHref = entry.attributes.getNamedItem('url');
    		var dwtHref = (tmpdwtHref) ? tmpdwtHref.value : "";
    		
    		var expandable = entry.attributes.getNamedItem('expandable');
    		var isExpandable = (expandable) ? true : false;
    			
    		var tmpdwtIcon = entry.attributes.getNamedItem('icon');
    		var dwtIcon = (tmpdwtIcon) ? tmpdwtIcon.value : "";
    		var curPosition = entry.attributes.getNamedItem('position').value;
    		
    		var cls;				
    		switch (dwtType) {
    			case "0" :
    				cls = (isExpandable) ? "folder" : "file";
    				break;
    			case "2" :
    				cls = "file";
    				break;
    			case "20" :
    				cls = "folder";
    				break;
    			default :
    				cls = "file";
    		};
    				
    		var curNode = new Tree.TreeNode({
    			text : dwtTitle, 
    			cls : cls, 
    			allowDrag : true, 
    			isTarget : true,
    			leaf : false,
    			dwtHref : dwtHref,
    			dwtType : dwtType,
    			dwtExpandable: isExpandable,
    			dwtPosition : curPosition,
    			icon : dwtIcon
    		});
    			
    		curNode.on('click', this.openEntry.createDelegate(this), this, true);	
    		
    		arNodes[curPosition] = curNode;
    		
    		if (curPosition.indexOf('.') > 0) {
    			var parentPosition = curPosition.substring(0,curPosition.lastIndexOf('.'));
    			arNodes[parentPosition].appendChild(curNode);	
    		} else {
    			root.appendChild(curNode);
    		}
    				
    	};
    	
    
    	tree.render();
    	root.expand();	
    };
    
    DominoUIOutline.prototype.openEntry = function(node, e){
    	var attributes, dwtType, dwtHref, dwtPosition, entryId, title;
    	attributes = node.attributes;
    	dwtHref = attributes.dwtHref;
    	dwtType = attributes.dwtType;
    	dwtPosition = attributes.dwtPosition;
    	entryId = "id-" + dwtPosition;
    	title = node.text;
    
    	//CUSTOM
    	if (dwtType == "2" || dwtType == "20") {
    		var viewUrl = (dwtHref.indexOf('?') > 0) ? dwtHref.split('?')[0] : dwtHref.split('!')[0];
    		var iframe = Ext.DomHelper.append(document.body, {tag: 'iframe', frameBorder: 0, src: viewUrl});
        		var panel = new Ext.ContentPanel(iframe, {title: title, fitToFrame:true, closable:true});
        		this.layout.add('center', panel);  
    	} else if (dwtHref != "") {
    		var viewUrl = (dwtHref.indexOf('?') > 0) ? dwtHref.split('?')[0] : dwtHref.split('!')[0];
    		var iframe = Ext.DomHelper.append(document.body, {tag: 'iframe', frameBorder: 0, src: viewUrl});
        		var panel = new Ext.ContentPanel(iframe, {title: title, fitToFrame:true, closable:true});
        		this.layout.add('center', panel);
    
    	}
    };
    
    Ext.data.Node.prototype.hasChildNodes = function() {
    	if (this.attributes.dwtType == "20" || (this.attributes.dwtType == "0" && this.attributes.dwtExpandable == true)) {
    			return true;
    	} else { 
    		return false;
    	}
    };
    Call:

    Code:
                  ........
                  .....
                  crearOutline : function(){
    	    outline = new DominoUIOutline({
    	    layout : layout,
                        outlinePanel : layoutWest, 
                        outlineUrl : 'http://dfdsfsd/dsfsdf.nsf/menuIzdo' <= Outline URL
                   });		
                   },
                   ......
    DominoXMLDataModel.js: Is in domino yui project but only works in old version of YUI-EXT. If somebody updates DominoXMLDataModel.js for new grid it would be good . Any ideas of how implement this?


    Thanks jack.

Page 1 of 2 12 LastLast

Similar Threads

  1. Lotus Domino Integration
    By nrevelle in forum Community Discussion
    Replies: 3
    Last Post: 7 Jul 2009, 7:10 AM
  2. POST with updatemanager and domino?
    By gizzmo in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 18 Dec 2006, 2:55 PM
  3. Domino + YUI... a little help (newbie)
    By JamieG in forum Ext 1.x: Help & Discussion
    Replies: 8
    Last Post: 7 Dec 2006, 8:52 AM
  4. rss feed reader in domino
    By gizzmo in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 13 Nov 2006, 2:15 PM
  5. For .net developers
    By rodiniz in forum Ext 1.x: Help & Discussion
    Replies: 5
    Last Post: 9 Oct 2006, 7:58 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •