alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

jforum example source code file (preview.jsp)

This example jforum source code file (preview.jsp) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - jforum tags/keywords

cancel, jspwiki, jspwiki, keep, save, so, so, string, string, this, utf-8, utf-8, wikicontext

The jforum preview.jsp source code

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki"%>
<%@ page import="com.ecyrd.jspwiki.*" %>
<%@ page import="com.ecyrd.jspwiki.ui.*" %>

<%--
        This is a special editor component for JSPWiki preview storage.
--%>
<% WikiContext context = WikiContext.findContext( pageContext ); %>
<% String usertext = (String)pageContext.getAttribute( EditorManager.ATTR_EDITEDTEXT, PageContext.REQUEST_SCOPE ); %>
<% if( usertext == null ) usertext = ""; %>
<% 
   String action = "comment".equals(request.getParameter("action")) ? 
                   context.getURL(WikiContext.COMMENT,context.getName()) : 
                   context.getURL(WikiContext.EDIT,context.getName());
 %>
<form accept-charset="
        <input name="link" type="hidden" value="<%=session.getAttribute("link")%>" />
        <input name="remember" type="hidden" value="<%=session.getAttribute("remember")%>" />

        <input name="page" type="hidden" value="
        <input name="action" type="hidden" value="save" />
        <input name="edittime" type="hidden" value="<%=pageContext.getAttribute("lastchange",
                                                                                PageContext.REQUEST_SCOPE )%>" />
    </p>
    <textarea style="display:none;" readonly="true"
              id="editorarea" name="<%=EditorManager.REQ_EDITEDTEXT%>" rows="4" cols="80"><%=TextUtil.replaceEntities(usertext)%>

    <div id="previewsavebutton" align="center">
        <input type="submit" name="edit" value="Keep editing" />
                
        <input type="submit" name="ok" value="Save" />
                
        <input type="submit" name="cancel" value="Cancel" />
     </div>

</form>

Other jforum examples (source code examples)

Here is a short list of links related to this jforum preview.jsp source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.