Results 1 to 8 of 8

Thread: HELP! DwtListView Header Problem...

  1. #1
    Join Date
    Sep 2005
    Posts
    14
    Rep Power
    10

    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 Attached Images

  2. #2
    Join Date
    Sep 2005
    Location
    Sunnyvale, CA
    Posts
    269
    Rep Power
    10

    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?

  3. #3
    Join Date
    Sep 2005
    Posts
    14
    Rep Power
    10

    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; 
    }

  4. #4
    Join Date
    Sep 2005
    Location
    Sunnyvale, CA
    Posts
    269
    Rep Power
    10

    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.

  5. #5
    Join Date
    Sep 2005
    Posts
    14
    Rep Power
    10

    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....

  6. #6
    Join Date
    Sep 2005
    Posts
    14
    Rep Power
    10

    Default

    Sorry, I forgot to tell you, I did not fixed the width of listview/table.
    In DOM Inspector tool, it shows 100% width.

  7. #7
    Join Date
    Sep 2005
    Location
    Sunnyvale, CA
    Posts
    269
    Rep Power
    10

    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.

  8. #8
    Join Date
    Sep 2005
    Posts
    14
    Rep Power
    10

    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....

Similar Threads

  1. Zimbra, WM5.0, AS + problem with regional fonts
    By wojo2000 in forum Zimbra Mobile
    Replies: 7
    Last Post: 06-25-2007, 01:04 AM
  2. Is it started or not
    By kwelipatton in forum Installation
    Replies: 10
    Last Post: 03-28-2006, 10:11 PM
  3. Problem with column resize in DwtListView
    By Heladito in forum Developers
    Replies: 9
    Last Post: 12-23-2005, 07:14 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
  •