alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  
<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>

Other jforum examples (source code examples)

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

jforum example source code file (plain.jsp)

This example jforum source code file (plain.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

case, homepage, ie6, match, replace, replace, replace:, search, string, string, this, utf-8, utf-8, your

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="" 
      name="editForm" enctype="application/x-www-form-urlencoded">
    <p>
        <%-- Edit.jsp relies on these being found.  So be careful, if you make changes. --%>
        <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="width:100%;" class="editor" 
              id="editorarea" name="<%=EditorManager.REQ_EDITEDTEXT%>" rows="25" cols="80"><%=TextUtil.replaceEntities(usertext)%>

   <wiki:CheckRequestContext context="edit">
       <label for="changenote">Change note
       <input type="text" id="changenote" name="changenote" size="40" maxlength="80" value="<%=changenote%>"/>
   </wiki:CheckRequestContext>
   <wiki:CheckRequestContext context="comment">
        <table border="0" class="small">
          <tr>
            <td>
... 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.