How can I get appointment list from zimlet?

Interested in talking about Mash-up's? This is the place.
14319KevinH
Ambassador
Ambassador
Posts: 4558
Joined: Fri Sep 12, 2014 9:52 pm

How can I get appointment list from zimlet?

Postby 14319KevinH » Wed Jun 21, 2006 12:09 pm

[quote user="dijichi2"]8080 is often blocked by overzealous isp's and it departments as it's the defacto proxy port and often used for nefarious means, including open proxies. i must say putting cvs on there is a strange thing to do.[/QUOTE]
CVS itself is on a the standard CVS port. 8080 is just the web based view of CVS, so not critical to getting at the CVS data. Time to complain to your network admin ;).


Kenji
Posts: 17
Joined: Fri Sep 12, 2014 10:12 pm

How can I get appointment list from zimlet?

Postby Kenji » Thu Jun 22, 2006 5:30 am

I watched data.js to know how to get appointment list.

But I couldn't understand how to use... :(
Can "_newApptListener" function in data.js get calendar controller to get appointment list?
Com_Zimbra_Date.prototype._newApptListener =

function() {

var cc = this._appCtxt.getApp(ZmZimbraMail.CALENDAR_APP).getCalController();

// TODO support ev

cc.newAppointmentHelper(Com_Zimbra_Date._actionContext.date, null, null/*. ev.shiftKey */);

};
It is my source as follows.
---------------------------------------------------------
Com_Zimbra_SForce.prototype.singleClicked = function() {

alert('singleClicked start');
Com_Zimbra_SForce._newApptListener();
alert('singleClicked end');

};
Com_Zimbra_SForce.prototype._newApptListener =

function() {

var cc = this._appCtxt.getApp(ZmZimbraMail.CALENDAR_APP).getCalController();

// TODO support ev

cc.newAppointmentHelper(Com_Zimbra_Date._actionContext.date, null, null/*. ev.shiftKey */);

};
---------------------------------------------
The error occurred by the "var cc = this._appCtxt.getApp..." line.
any ideas?
Thanks&Regards
14319KevinH
Ambassador
Ambassador
Posts: 4558
Joined: Fri Sep 12, 2014 9:52 pm

How can I get appointment list from zimlet?

Postby 14319KevinH » Thu Jun 22, 2006 10:09 am

It's DATE.js not DATA.js right? Just want to be 100% sure your looking at the right file.
What is the exact error your getting from your JavaScript console?
Kenji
Posts: 17
Joined: Fri Sep 12, 2014 10:12 pm

How can I get appointment list from zimlet?

Postby Kenji » Fri Jun 23, 2006 2:14 am

I mistaked.

It is date.js.
I modified my source.
---------------------------------------------------------

/// Called by the Zimbra framework when the SForce panel item was clicked

Com_Zimbra_SForce.prototype.singleClicked = function() {

alert('singleClicked start');
//Com_Zimbra_SForce.prototype._newApptListener();
var cc = this._appCtxt.getApp(ZmZimbraMail.CALENDAR_APP).getCalController();

// TODO support ev

cc.newAppointmentHelper(Com_Zimbra_SForce._actionContext.date, null, null/*. ev.shiftKey */)
alert('singleClicked end');

};
---------------------------------------------------------
JavaScript Console show me error that is "Com_Zimbra_SForce._actionContext has no properties."
Kenji
Posts: 17
Joined: Fri Sep 12, 2014 10:12 pm

How can I get appointment list from zimlet?

Postby Kenji » Fri Jun 23, 2006 3:01 am

I create com_zimbra_date by using date.js.
The same error occur.
Please watche this zimlet.

com_zimbra_date.zip

14319KevinH
Ambassador
Ambassador
Posts: 4558
Joined: Fri Sep 12, 2014 9:52 pm

How can I get appointment list from zimlet?

Postby 14319KevinH » Fri Jun 23, 2006 5:22 pm

Well you need to pass in the actual date. That function assumes you are hovering over a date, but your use case may be different.
Kenji
Posts: 17
Joined: Fri Sep 12, 2014 10:12 pm

How can I get appointment list from zimlet?

Postby Kenji » Tue Jun 27, 2006 1:46 am

Hello KevinH.
You said following message.
[quote user="14319KevinH"]

If you already in a Zimlet then you can use the native JS calls rather than trying to make another SOAP call. Take a look at the date zimlet. date.js it has code to get a handle to the calendar controller and get various lists of appointments.[/QUOTE]
What should I do?
Could you tell me about it?
14319KevinH
Ambassador
Ambassador
Posts: 4558
Joined: Fri Sep 12, 2014 9:52 pm

How can I get appointment list from zimlet?

Postby 14319KevinH » Tue Jun 27, 2006 10:08 am

Kenji, The code is above. You need to pass in a valid date. The error you are getting is pretty clear the value you are passing in is null or has no value. You need to pass in a valid date object.
Kenji
Posts: 17
Joined: Fri Sep 12, 2014 10:12 pm

How can I get appointment list from zimlet?

Postby Kenji » Thu Jul 06, 2006 8:52 pm

Finally, I could got appointment list!!!
Thanks KevinH
krystian
Posts: 4
Joined: Fri Sep 12, 2014 11:27 pm

How can I get appointment list from zimlet?

Postby krystian » Mon Apr 14, 2008 1:58 pm

Kenji,
Care to post the code that you came up with? I'm also learning zimbra and would love to see how you achieved this and how your code was refined.
-krystian

Return to “Zimlets”

Who is online

Users browsing this forum: No registered users and 3 guests