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

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 04-29-2009, 01:58 PM
g23 g23 is offline
Junior Member
 
Posts: 7
Default zmObject.srcObj gone?

Ok, I thought I was going crazy but it turns out not :-).

I downloaded what I think is the latest version of the Desktop zimbra app from the zimbra site, and created a nice little dev environment on my linux desktop. I wrote cool little zimlet which worked great and used (from examples and what I have found around) zmObject.srcObj and all worked well.

Then when I uploaded my new zimlet to my production environment :
Release 5.0.13_GA_2791.UBUNTU8_64 UBUNTU8_64 NETWORK edition

It totally didn't work. After going through the debugger I realised that oddly enoug
zmObject.srcObj was undefined. So I went through the source code and in

Zimbra_all.js on my desktop environment, in fact the zmObject is assigning srcObj
but in the production environment, that line has been taken out.

So my question is, is this a bug in my version? or is this taken out on purpose as it seems srcObj has been taken out of all zmObject wrappers.


If it has been taken out, what would be the proper way to get the object we are looking for? Is there a generic getObject() call we can use with the object id which we do get in the zmObject class?


G23

Last edited by g23; 04-29-2009 at 02:20 PM..
Reply With Quote
  #2 (permalink)  
Old 04-29-2009, 02:20 PM
g23 g23 is offline
Junior Member
 
Posts: 7
Default fixed I think

well, after snooping around more souce code I think I solved my issue by using
appCtxt.getById(zmObject.id); Though I have not tested it in production yet.

It is odd though that the desktop has a different code base than production, especially when
the zimlet wiki is stating that the desktop environment is a better way to develop.

Also, zmObject.srcObj is still on the wiki zimlet RSS feed example.


G23
Reply With Quote
  #3 (permalink)  
Old 04-29-2009, 02:39 PM
Elite Member
 
Posts: 281
Default

See also this thread, in the zDesktop forum. Guess you beat me to posting about this.
__________________
Freddie
Reply With Quote
  #4 (permalink)  
Old 04-30-2009, 12:49 AM
Zimlet Guru & Moderator
 
Posts: 288
Default

Quote:
it seems srcObj has been taken out
No! the srcObj is not implemented yet on the server version.
It will be integrated with the version 6.0.0 :
Bug 34467 – Pass original object as a part of translated object
Reply With Quote
  #5 (permalink)  
Old 04-30-2009, 06:49 AM
Zimbra Employee
 
Posts: 187
Default

Quote:
Originally Posted by g23 View Post
Ok, I thought I was going crazy but it turns out not :-).

I downloaded what I think is the latest version of the Desktop zimbra app from the zimbra site, and created a nice little dev environment on my linux desktop. I wrote cool little zimlet which worked great and used (from examples and what I have found around) zmObject.srcObj and all worked well.

Then when I uploaded my new zimlet to my production environment :
Release 5.0.13_GA_2791.UBUNTU8_64 UBUNTU8_64 NETWORK edition

It totally didn't work. After going through the debugger I realised that oddly enoug
zmObject.srcObj was undefined. So I went through the source code and in

Zimbra_all.js on my desktop environment, in fact the zmObject is assigning srcObj
but in the production environment, that line has been taken out.

So my question is, is this a bug in my version? or is this taken out on purpose as it seems srcObj has been taken out of all zmObject wrappers.


If it has been taken out, what would be the proper way to get the object we are looking for? Is there a generic getObject() call we can use with the object id which we do get in the zmObject class?


G23
srcObj was introduced in 5.0.14 in ZCS. The Zimbra Desktop GA is based on 5.0.16. So, If you upgrade to 5.0.14 or newer version you should be ok.

PS:The wiki doc is currently work-in-progress and I will make sure to add this information.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #6 (permalink)  
Old 07-06-2009, 05:41 AM
Member
 
Posts: 13
Default

I was suffered by this problems for weeks as I followed this guide
Zimlet cookbook based on JavaScript API - Zimbra :: Wiki

and thought it was a problem with my code. Now it's fixed.


Thank you thank you thank you
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


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.