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 10-29-2007, 09:18 AM
Project Contributor
 
Posts: 31
Thumbs up New Folder

I want to add another Top Level Folder like "Inbox" to the folders section. I want to call this folder "My Folder" and then be able to add sub folders underneath it to match a directory structure of a Document Management system. Is there sample code to show how to create a new top level folder and add sub folders to it??

Thanx Joe
Reply With Quote
  #2 (permalink)  
Old 10-29-2007, 12:13 PM
Zimbra Employee
 
Posts: 4,792
Default

There is no way via a Zimlet today to add a new System Folder. You'd have to make a core code change.... In general most folks add a zimlet that launches a new dialog that has the tree structure in there.
__________________
Bugzilla - Wiki - Downloads - Offline Client
Reply With Quote
  #3 (permalink)  
Old 10-29-2007, 01:20 PM
Project Contributor
 
Posts: 31
Default New Folder

Kevin

I the init method of the Zimlet, I have been able to call this to
create a new Folder:

// Create Folder
soapDoc = AjxSoapDoc.create("CreateFolderRequest", "urn:zimbraMail");
var folderNode = soapDoc.set("folder");
folderNode.setAttribute("name", "Xythos");
folderNode.setAttribute("l", top.id);
folderNode.setAttribute("view", ZmOrganizer.VIEWS[ZmOrganizer.FOLDER]);
command = new ZmCsfeCommand();
var resp = command.invoke({soapDoc: soapDoc});
var id = resp.Body.CreateFolderResponse.folder[0].id;


However I am now trying to have my Zimlet called if a conversation is dropped into this folder. Is there a way to assign a listener to this??

Thanx Joe
Reply With Quote
  #4 (permalink)  
Old 10-29-2007, 04:11 PM
Zimlet Guru & Moderator
 
Posts: 467
Default

Quote:
Originally Posted by jfavero View Post
Kevin

I the init method of the Zimlet, I have been able to call this to
create a new Folder:

// Create Folder
soapDoc = AjxSoapDoc.create("CreateFolderRequest", "urn:zimbraMail");
var folderNode = soapDoc.set("folder");
folderNode.setAttribute("name", "Xythos");
folderNode.setAttribute("l", top.id);
folderNode.setAttribute("view", ZmOrganizer.VIEWS[ZmOrganizer.FOLDER]);
command = new ZmCsfeCommand();
var resp = command.invoke({soapDoc: soapDoc});
var id = resp.Body.CreateFolderResponse.folder[0].id;


However I am now trying to have my Zimlet called if a conversation is dropped into this folder. Is there a way to assign a listener to this??

Thanx Joe
Part of the problem here is that folder content can come from other places then just the Zimbra web front end. You might be able to attach to the organizer to find out what's going on, but that won't help at all for other behavior.

It would be nice to have a way to attach behavior to a particular folder, but I don't know of one.
Reply With Quote
  #5 (permalink)  
Old 10-29-2007, 09:36 PM
Zimbra Employee
 
Posts: 4,792
Default

Joe - That will create the folder (and btw may fail or error on the 2nd login) so in that case you need a listfolder request to get the ID.

One idea would be to hook into the global notifications for the mailbox and then look for messages that match the folder you've created. It just doesn't seem very efficient to do it this way. If your trying to sync it may be better to write a client that interacts with the sync API and provide a way for the user to sync on-demand.
__________________
Bugzilla - Wiki - Downloads - Offline Client
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.