Package org.apache.roller.presentation.weblog.formbeans

Examples of org.apache.roller.presentation.weblog.formbeans.CommentFormEx


        ctx.put("isCommentPage",     Boolean.TRUE);
        ctx.put("escapeHtml",        new Boolean(escapeHtml) );
        ctx.put("autoformat",        new Boolean(autoFormat) );               
       
        // Make sure comment form object is available in context
        CommentFormEx commentForm =
                (CommentFormEx) request.getAttribute("commentForm");
        if ( commentForm == null ) {
            commentForm = new CommentFormEx();
           
            // Set fields to spaces to please Velocity
            commentForm.setName("");
            commentForm.setEmail("");
            commentForm.setUrl("");
            commentForm.setContent("");
        }
        ctx.put("commentForm",commentForm);
       
        // Either put a preview comment in to context
        if ( request.getAttribute("previewComments")!=null ) {
            ArrayList list = new ArrayList();
            CommentData cd = new CommentData();
            commentForm.copyTo(cd, request.getLocale());
            list.add(CommentDataWrapper.wrap(cd));
            ctx.put("previewComments",list);
        }
       
        WeblogEntryData entry = rreq.getWeblogEntry();
View Full Code Here


           
            WebsiteData website = entry.getWebsite();
           
            // Construct our Comment object from the submitted data
            WeblogManager mgr = RollerFactory.getRoller().getWeblogManager();
            CommentFormEx cf = new CommentFormEx();
            CommentData comment = new CommentData();
            RequestUtils.populate(cf, request);
            cf.copyTo(comment, request.getLocale());
           
            comment.setWeblogEntry(entry);
            comment.setRemoteHost(request.getRemoteHost());
            comment.setPostTime(new java.sql.Timestamp(System.currentTimeMillis()));
           
            cf.setWeblogEntry(entry);
            cf.setPostTime(new java.sql.Timestamp(System.currentTimeMillis()));
           
            request.setAttribute("commentForm", cf);
            request.setAttribute("blogEntry", entry);
           
            if (preview) {
View Full Code Here

TOP

Related Classes of org.apache.roller.presentation.weblog.formbeans.CommentFormEx

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.