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 Display Modes
  #1 (permalink)  
Old 02-05-2009, 11:41 AM
Starter Member
 
Posts: 2
Default force poll or refresh from zimlet

I am playing with the Evite zimlet. This zimlet syncs the user's calendar with his or her calendar at Evite (by creating calendar items via ajax soap requests). However, the appointments do not show up in the calendar until (1) the mail poll interval (noop soap request) occurs or (2) the refresh button is pressed (Search soap request).

I am writing a similar zimlet, and do not want to wait for poll or require user refresh. Is it possible to force the poll or refresh from within the Zimlet? If not other way to push content to Zimbra?
Reply With Quote
  #2 (permalink)  
Old 02-06-2009, 02:09 AM
Zimlet Guru & Moderator
 
Posts: 199
Wink

Here is the js code that should do the refresh :
Code:
var controller = appCtxt.getCurrentController();
controller._refreshAction(false);
Reply With Quote
  #3 (permalink)  
Old 02-08-2009, 08:41 PM
Starter Member
 
Posts: 2
Default force poll or refresh from zimlet

Thanks tdesorbaix.

I pasted the lines you gave me at the end of the try block in Com_zimbra_evite.prototype.myCallback and it works perfectly.
Reply With Quote
  #4 (permalink)  
Old 02-17-2009, 01:03 PM
Starter Member
 
Posts: 2
Default how to refresh calendar view when the user is not in calendar tab

var controller = appCtxt.getCurrentController();
controller._refreshAction(false);
works only if the user is in calendar tab. How to refresh the calendar view when user is not in calendar tab? Thanks.
Reply With Quote
  #5 (permalink)  
Old 02-17-2009, 03:58 PM
Zimbra Employee
 
Posts: 115
Default

Quote:
Originally Posted by yuelu View Post
var controller = appCtxt.getCurrentController();
controller._refreshAction(false);
works only if the user is in calendar tab. How to refresh the calendar view when user is not in calendar tab? Thanks.
you can do something like..

Code:
if(this._calController == undefined)
 this._calController = AjxDispatcher.run("GetCalController");

 this._calController._refreshAction(false)
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #6 (permalink)  
Old 02-18-2009, 12:48 AM
Senior Member
 
Posts: 63
Default how to refresh mail view

how to refresh mail list like you click "Inbox" or "Get Mail" button.
thank.
Reply With Quote
  #7 (permalink)  
Old 02-18-2009, 07:41 PM
Senior Member
 
Posts: 63
Default

I got code.
I put this code in my js file and tag can update immadately

appCtxt.getApp(ZmApp.MAIL)._mailSearch();
Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

Zimbrablog.com




 

Search Engine Optimization by vBSEO 3.1.0