| 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.
|  | 
10-26-2005, 01:59 AM
| | | 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>>>>  | 
10-26-2005, 02:05 AM
| | Zimbra Employee | |
Posts: 269
| | 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? | 
10-26-2005, 03:17 AM
| | | 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;
} | 
10-26-2005, 11:48 AM
| | Zimbra Employee | |
Posts: 269
| | 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. | 
10-26-2005, 07:12 PM
| | | 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....  | 
10-26-2005, 07:16 PM
| | | Sorry, I forgot to tell you, I did not fixed the width of listview/table.
In DOM Inspector tool, it shows 100% width. | 
10-28-2005, 11:04 AM
| | Zimbra Employee | |
Posts: 269
| | 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. | 
10-29-2005, 07:58 PM
| | | 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....  | | Thread Tools | Search this Thread | | | | | Display Modes | Linear Mode | | Why Join? Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.  |