| 1 13 package info.magnolia.cms.gui.dialog; 14 15 import java.io.IOException ; 16 import java.io.Writer ; 17 18 import javax.servlet.http.HttpServletRequest ; 19 20 import org.slf4j.Logger; 21 import org.slf4j.LoggerFactory; 22 23 24 28 public class DialogInclude extends DialogBox { 29 30 33 private static Logger log = LoggerFactory.getLogger(DialogInclude.class); 34 35 38 protected DialogInclude() { 39 } 40 41 44 public void drawHtml(Writer out) throws IOException { 45 this.drawHtmlPre(out); 46 HttpServletRequest request = this.getRequest(); 47 if (request == null) { 48 request = this.getTopParent().getRequest(); 49 } 50 51 try { 52 request.setAttribute("dialogObject", this); 54 String file = this.getConfigValue("file"); 56 request.getRequestDispatcher(file).include(request, this.getResponse()); 57 58 request.removeAttribute("dialogObject"); } 60 catch (Exception e) { 61 log.error(e.getMessage(), e); 62 } 63 this.drawHtmlPost(out); 64 } 65 } 66 | Popular Tags |