Since there is really little information for beginner of zimlet, as a beginner, I want to share experience that I have found.

I have searched the information for closing a compose view, and the way to detect the closing/cancelling of a compose mail as follow:

Code:
com_projectapprovar_HandlerObject.prototype.onAction = function(type, action, currentViewId, lastViewId) {
	if (lastViewId.indexOf(ZmId.VIEW_COMPOSE) == 0){
		if ((action=="Compose")&&(type=="app")){
			alert("cancel by tap icon");
			return;
		}
		if ((action=="Cancel")&&(type=="button")){
			alert("cancel by cancel button");
			return;
		}
	}
}
Hope this can help the beginners like me!