1 16 package org.apache.cocoon.acting; 17 18 import org.apache.avalon.framework.parameters.Parameters; 19 20 import org.apache.cocoon.environment.ObjectModelHelper; 21 import org.apache.cocoon.environment.Redirector; 22 import org.apache.cocoon.environment.Request; 23 import org.apache.cocoon.environment.SourceResolver; 24 25 import java.util.Map ; 26 27 54 public class SendmailAction extends Sendmail { 55 56 public Map act(Redirector redirector, 57 SourceResolver resolver, 58 Map objectModel, 59 String source, 60 Parameters parameters) 61 throws Exception { 62 63 Request request = ObjectModelHelper.getRequest(objectModel); 64 if (!parameters.isParameter("from")) { 65 parameters.setParameter("from", request.getParameter("from")); 66 } 67 if (!parameters.isParameter("to")) { 68 parameters.setParameter("to", request.getParameter("to")); 69 } 70 if (!parameters.isParameter("replyTo")) { 71 parameters.setParameter("replyTo", request.getParameter("replyTo")); 72 } 73 if (!parameters.isParameter("subject")) { 74 parameters.setParameter("subject", request.getParameter("subject")); 75 } 76 if (!parameters.isParameter("body")) { 77 parameters.setParameter("body", request.getParameter("body")); 78 } 79 80 return super.act(redirector, resolver, objectModel, source, parameters); 81 } 82 } 83 | Popular Tags |