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

jforum example source code file (DiffContent.jsp)

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

back, back, difference, difference, go, go, this, utf-8, utf-8, view, why, wikicontext

The jforum DiffContent.jsp source code

<%@ page import="com.ecyrd.jspwiki.tags.InsertDiffTag" %>
<%@ page import="com.ecyrd.jspwiki.*" %>
<%@ taglib uri="/WEB-INF/jspwiki.tld" prefix="wiki" %>

<div id="diffcontent" >

    <wiki:PageExists>
    <div class="diffnote">

    <form action="     
    Difference between version
    <select id="r1" name="r1" onchange="this.form.submit();" >
    <% 
       WikiContext c = WikiContext.findContext( pageContext );
       int latestVersion = c.getPage().getVersion();;
       int ii = 0;
       ii = ((Integer)pageContext.getAttribute(InsertDiffTag.ATTR_OLDVERSION, 
                                               PageContext.REQUEST_SCOPE)).intValue();
       if( ii == WikiProvider.LATEST_VERSION ) ii = latestVersion;
       for( int i = 1; i <= latestVersion; i++) 
       {
    %> 
       <option value="<%= i %>" <%= ((i==ii) ? "selected='selected'" : "") %> ><%= i %>
    <%
       }    
    %>
    </select>
    and version
    <select id="r2" name="r2" onchange="this.form.submit();" >
    <% 
       ii = ((Integer)pageContext.getAttribute(InsertDiffTag.ATTR_NEWVERSION, 
                                               PageContext.REQUEST_SCOPE)).intValue();
       for( int i = 1; i <= latestVersion; i++) 
       {
    %> 
       <option value="<%= i %>" <%= ((i==ii) ? "selected='selected'" : "") %> ><%= i %>
    <%
       }    
    %>
    </select>
        
    <a title="Go to first change in this document" 
       href="#change-1">View first change</a>»»
    </form>
    <br />
    Back to <wiki:LinkTo>, or
    <wiki:PageInfoLink> version history
    </div>
    <br />
    <wiki:InsertDiff>
      <i>No difference detected.
    </wiki:InsertDiff> 
    </wiki:PageExists>
    
    <wiki:NoSuchPage>
    <p>
    This page does not exist.  Why don't you go and <wiki:EditLink>create it?
    </p>
    </wiki:NoSuchPage>

</div>

Other jforum examples (source code examples)

Here is a short list of links related to this jforum DiffContent.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.