Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-26-2005, 01:59 AM
Member
 
Posts: 14
Default HELP! DwtListView Header Problem...

Dear sir,

I create some listview screen to show some data....
But the header will always display as shown in attached file.
The TD element will render with width of font size (I guess) and
DIV element will render with width in pixel size.

Why this....?

HELP>>>>
Attached Images
File Type: jpg HtmlHeader.jpg (12.3 KB, 205 views)
Reply With Quote
  #2 (permalink)  
Old 10-26-2005, 02:05 AM
Zimbra Employee
 
Posts: 269
Default

Quote:
Originally Posted by sirick
Dear sir,

I create some listview screen to show some data....
But the header will always display as shown in attached file.
The TD element will render with width of font size (I guess) and
DIV element will render with width in pixel size.

Why this....?

HELP>>>>
Are you overloading DwtListView in a new class? Can you provide some code on how you are instantiating DwtListView and populating the headers?
Reply With Quote
  #3 (permalink)  
Old 10-26-2005, 03:17 AM
Member
 
Posts: 14
Default

Yes!!! I use code in ZimbraWebmail....
By overloading ZmListView (Remove some unnecessary code for me)
But not override CreateHTMLHeader function
as below

Code:
function fgMasterFileListView(parent, className, posStyle, view, type, headerList, dropTgt) {

	if (arguments.length == 0) return;
	
	if (!headerList)
	   headerList = this._getHeaderList();
	//parent, className, posStyle, view, type, headerList, dropTgt
	className = className ? className : "DwtListView"; //"fgMasterFileListView"; 
	fgListView.call(this, parent, className, posStyle, fgController.MASTERFILE_VIEW, type, headerList); 

	this._listChangeListener = new AjxListener(this, this._changeListener);

}

fgMasterFileListView.prototype._getHeaderList =
function() {

	var headerList = new Array();
    //id, label, iconInfo, width, sortable, resizeable, visible, name
	headerList.push(new DwtListHeaderItem('id--c', fgMsg[fgMasterFile.A_IdentityID], null, fgMasterFile.DEFAULTWIDTH[fgMasterFile.A_IdentityID], fgMasterFile.A_Code, true, true, fgMasterFile.A_IdentityID));
	headerList.push(new DwtListHeaderItem('co--c', fgMsg[fgMasterFile.A_Code], null, fgMasterFile.DEFAULTWIDTH[fgMasterFile.A_Code], fgMasterFile.A_Code, true, true, fgMasterFile.A_Code));
	headerList.push(new DwtListHeaderItem('na--c', fgMsg[fgMasterFile.A_MyName], null, fgMasterFile.DEFAULTWIDTH[fgMasterFile.A_MyName], fgMasterFile.A_MyName, true, true, fgMasterFile.A_MyName));

	return headerList; 
}
Reply With Quote
  #4 (permalink)  
Old 10-26-2005, 11:48 AM
Zimbra Employee
 
Posts: 269
Default

Quote:
Originally Posted by sirick
fgMasterFileListView.prototype._getHeaderList =
function() {

var headerList = new Array();
//id, label, iconInfo, width, sortable, resizeable, visible, name
headerList.push(new DwtListHeaderItem('id--c', fgMsg[fgMasterFile.A_IdentityID], null, fgMasterFile.DEFAULTWIDTH[fgMasterFile.A_IdentityID], fgMasterFile.A_Code, true, true, fgMasterFile.A_IdentityID));
headerList.push(new DwtListHeaderItem('co--c', fgMsg[fgMasterFile.A_Code], null, fgMasterFile.DEFAULTWIDTH[fgMasterFile.A_Code], fgMasterFile.A_Code, true, true, fgMasterFile.A_Code));
headerList.push(new DwtListHeaderItem('na--c', fgMsg[fgMasterFile.A_MyName], null, fgMasterFile.DEFAULTWIDTH[fgMasterFile.A_MyName], fgMasterFile.A_MyName, true, true, fgMasterFile.A_MyName));

return headerList;
}[/CODE]
ok, what are the values of the CONST's you are using in setting the widths of the columns headers? You have to make sure the width of the table/listview these column headers are sitting in is either not defined (so the browser can calc. the full width automatically) or if defined, adds up to the sum of all the widths of these columns.

It basically looks like the width of your listview has a fixed width and the sum of the width of the columns are more than can fit within the table causing them to overlap each other. Make sense?

Of course i could be wrong here, but thats what it looks like from the screenshot and code you provided.
Reply With Quote
  #5 (permalink)  
Old 10-26-2005, 07:12 PM
Member
 
Posts: 14
Default

First time, all column width is enter by using value (30, 50 and 100).
And I changed it later by using defined in fgMasterFile.DEFAULTWIDTH[xxx].

Both did not work for me.

I try to use firefox Dom Inspector tool to investigate...
it show TD width = 30 and DIV width = 30px....
Reply With Quote
  #6 (permalink)  
Old 10-26-2005, 07:16 PM
Member
 
Posts: 14
Default

Sorry, I forgot to tell you, I did not fixed the width of listview/table.
In DOM Inspector tool, it shows 100% width.
Reply With Quote
  #7 (permalink)  
Old 10-28-2005, 11:04 AM
Zimbra Employee
 
Posts: 269
Default

Hmm. Have you tried checking out the examples under Ajax/WebRoot/examples? If you follow the same format in creating a listview for the dataView example, i think you will have better success.
Reply With Quote
  #8 (permalink)  
Old 10-29-2005, 07:58 PM
Member
 
Posts: 14
Default

I did it, i swear...

I use DOM Inspector to investigate it....
And OffsetWidth is about 3x of width all the times...

Ok... I will try to solve it again....
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.