Results 1 to 3 of 3

Thread: DwtDialog

  1. #1
    sondor's Avatar
    sondor is offline Member
    Join Date
    Jun 2007
    Posts
    13
    Rep Power
    8

    Default DwtDialog

    Hello guys!

    First of all I have to commend Zimbra programmers and designers because they have done a remarkable javascript library.

    Ok, now I should get to the point? Does enybody have a working example for DwtDialog object? I tried to make a new DwtDialog object over DwtComposite object, but it doesn't work.

    composite = new DwtComposite(composite, null, DwtControl.ABSOLUTE_STYLE);
    composite .setBounds(1, 200, 1000, 700);
    composite .zShow(false);

    buttons = new Array();
    buttons .push(DwtDialog.CANCEL_BUTTON);
    buttons .push(DwtDialog.OK_BUTTON);

    dialog = new DwtDialog(composite , null, "Add customer", buttons , null, null, null, null);


    Can enybody help me please?
    Last edited by sondor; 06-26-2007 at 11:41 AM.

  2. #2
    sondor's Avatar
    sondor is offline Member
    Join Date
    Jun 2007
    Posts
    13
    Rep Power
    8

    Default

    basedialog = new DwtDialog(shell, null,"<b>Insert customer</b>", [DwtShell.CANCEL_BUTTON, DwtDialog.OK_BUTTON], null, null, DwtDialog.MODAL, null);
    var html=["testing"].join("");
    basedialog.setContent(html);
    basedialog.popup();

    I have manage to resolve this by myself. First off all you need a shell as your primary javascript object and then you just have to call popup function. Thaks for your noncooperation. Joke. Now I have a different kind of problem. The buttons that substitute standardbuttons variable when I'm creating basedialog object are never in visible mode! Any clues?
    Last edited by sondor; 06-26-2007 at 02:09 PM.

  3. #3
    sondor's Avatar
    sondor is offline Member
    Join Date
    Jun 2007
    Posts
    13
    Rep Power
    8

    Default

    Don't bother at all. I found the error. I'm using one of the first zimbra dwt library so there was an error in DwtDialog constructor where the buttons are made. The buttons are constructed just fine, but the label was newer shown.
    There seems to be that I have some problems with DwtMsg(...) function so I have just transformed this line

    "this._button[buttonId].setText(this._buttonDesc[buttonId].label); "

    into

    this._button[buttonId].setText(DwtDialog.MSG_KEY[this._buttonDesc[buttonId].id]);

    Thats all from me! See you!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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