How can i get Addressfield-information by Drag&Drop to a Zimlet?

Interested in talking about Mash-up's? This is the place.
Post Reply
gerdpape
Posts: 3
Joined: Wed Dec 17, 2014 1:15 pm

How can i get Addressfield-information by Drag&Drop to a Zimlet?

Post by gerdpape »

In earlier Version of Zimbra <= 8.6.x i used a Zimlet that exports Addressfield-Informations like "firstName", "lastName" ect. to a Zimlet by Drag&Drop.

But after Update to Zimbra Version 8.7.x this will not work. All var's ar emty or "undefined"

In the xml-coniguration File i define the Tag

<dragSource type="ZmContact" />

And this is a part of my js-File with the defines function and commands that works with no problems in Zimbra Version <= 8.6.x :
-------------------------------------------------------------
/**
* Drag Source
*/
com_zimbra_briefvorlage_HandlerObject.prototype.doDrop =
function(obj) {

var contactObj = obj; // {ZmContact}

var cfistname = contactObj.firstName;
var clastname = contactObj.lastName;
var ccompany = contactObj.company;

var displayName =" ";

displayName=contactObj.firstName+" "+contactObj.lastName;

if (this.pbDialog1) {
if (this.pbDialog1.runInBackground) {
this.pbDialog1.runInBackground = false;
}
}

//
// Ein neues leeres Dialogfenster erzeugen
//
this.pView = new DwtComposite(this.getShell()); // creates an empty div as a child of main shell div
this.pView.setSize("520", "260"); // set width and height
this.pView.getHtmlElement().style.overflow = "auto"; // adds scrollbar

this.pView.getHtmlElement().innerHTML = this._createAuswahlFenster(contactObj); // insert html to the dialogbox

// pass the title, view & buttons information to create dialog box

this.pbDialog1 = new ZmDialog({title:"Briefvorlage auswaehlen: "+displayName,
view:this.pView,
parent:this.getShell(),
standardButtons:[DwtDialog.CANCEL_BUTTON]});

this.pbDialog1.setButtonListener(DwtDialog.CANCEL_BUTTON, new AjxListener(this, this._cancelBtnListener));

this.pbDialog1.popup(); // show Dialog

};
-----------------------------
Now in Zimbra 8.7.x the ContactObj and Var's firtsName, lastName and company are undefined or emty when i Drag&Drop a Address from my Contact-Folder to the Zimlet.

Can everyone tell me what i must change in the code that it will work with Zimbra 8.7.x and above.

Sorry, for my bad english ;-)

greatings
Post Reply