| 
jforum example source code file (plain.jsp)
 The jforum plain.jsp source code
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki"%>
<%@ page import="com.ecyrd.jspwiki.*" %>
<%@ page import="com.ecyrd.jspwiki.tags.*" %>
<%@ page import="com.ecyrd.jspwiki.ui.*" %>
<%--
        This is a plain editor for JSPWiki.
--%>
<% WikiContext context = WikiContext.findContext( pageContext ); %>
<% String usertext = EditorManager.getEditedText( pageContext ); 
   TemplateManager.addResourceRequest( context, "script", 
                                       context.getURL(WikiContext.NONE,"scripts/searchreplace.js") );
   String changenote = (String)session.getAttribute("changenote");
   changenote = changenote != null ? TextUtil.replaceEntities(changenote) : ""; %>
<wiki:CheckRequestContext context="edit"><%
    if( usertext == null )
    {
        usertext = context.getEngine().getPureText( context.getPage() );
    }%>
</wiki:CheckRequestContext>
<% if( usertext == null ) usertext = ""; %>
<div style="width:100%"> <%-- Required for IE6 on Windows --%>
<form accept-charset=" | 
            <td>" />
            <td>
            <input type="checkbox" name="remember" id="rememberme" <%=TextUtil.isPositive((String)session.getAttribute("remember")) ? "checked='checked'" : ""%>"/>
          </tr>
          <tr>
            <td>
            <td colspan="2">" />
          </tr>
        </table>
    </wiki:CheckRequestContext>
    <p>
        <input name='ok' type='submit' value='Save' />
                
        <input name='preview' type='submit' value='Preview' />
                
        <input name='cancel' type='submit' value='Cancel' />
    </p>
</form>
</div>
    <%-- Search and replace section --%>
    <form name="searchbar" id="searchbar" action="#">
      <label for="findText">Find:
      <input type="text" id="findText" size="16"/>
      <label for="replaceText">Replace:
      <input type="text" id="replaceText" size="16"/>
      <input type="checkbox" id="matchCase" />
      <input type="checkbox" id="regExp" />
      <input type="checkbox" id="global" checked="checked"/>
       
      <input type="button" id="replace" value="Replace" onclick="SearchReplace.editReplace(this.form, document.getElementById('editorarea') );" />
      <span id="undoHideOrShow" style="visibility:hidden;" >
        <input type="button" id="undo" value="Undo" onclick="SearchReplace.editUndo(this.form, document.getElementById('editorarea') );" />
      </span>
      <input type="hidden" id="undoMemory" value="" />
    </form>
    
| ... this post is sponsored by my books ... | |
         
           #1 New Release!  | 
      
         
           FP Best Seller  | 
  
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.