1 package info.magnolia.module.admininterface.dialogpages; 2 3 import info.magnolia.cms.gui.dialog.DialogRichedit; 4 import info.magnolia.cms.gui.dialog.DialogSuper; 5 import info.magnolia.module.admininterface.DialogPageMVCHandler; 6 7 import java.io.IOException ; 8 import java.io.PrintWriter ; 9 10 import javax.servlet.http.HttpServletRequest ; 11 import javax.servlet.http.HttpServletResponse ; 12 13 import org.apache.log4j.Logger; 14 15 16 20 public class RichEditorIFrameDialogPage extends DialogPageMVCHandler { 21 22 public RichEditorIFrameDialogPage(String name, HttpServletRequest request, HttpServletResponse response) { 23 super(name, request, response); 24 } 25 26 29 private static final long serialVersionUID = 222L; 30 31 34 private static Logger log = Logger.getLogger(RichEditorIFrameDialogPage.class); 35 36 protected void draw(HttpServletRequest request, HttpServletResponse response) throws IOException { 37 PrintWriter out = response.getWriter(); 38 39 DialogRichedit richE = (DialogRichedit) request.getSession().getAttribute( 40 request.getParameter(DialogSuper.SESSION_ATTRIBUTENAME_DIALOGOBJECT)); 41 if (richE != null) { 42 richE.removeSessionAttribute(); 43 richE.drawHtmlEditor(out); 44 } 45 else { 46 log.error("DialogRichedit not found in session with name [" + request.getParameter(DialogSuper.SESSION_ATTRIBUTENAME_DIALOGOBJECT) + "]"); } 49 } 50 51 } 52 | Popular Tags |