alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  
<td> </tr> <wiki:PageType type="attachment"> <tr> <td>Parent page <td> </tr> </wiki:PageType> <tr> <td>Page last modified <td> </tr> <tr> <td>Current page version <td>No versions. </tr> <tr> <td>Page feed <td> <wiki:Param name="page" value="<%=c.getName()%>"/> <wiki:Param name="mode" value="wiki"/> </wiki:Link>">" border="0" alt="[RSS]"/> </tr> <wiki:Permission permission="rename"> <tr> <td>Rename page <td> <form action=" <input type="hidden" name="page" value=" <input type="text" name="renameto" value="
<input type="checkbox" name="references" checked="checked"/>Update referrers?
<input type="submit" value="Rename"/> </form> </td> </tr> </wiki:Permission> <wiki:Permission permission="delete"> <tr> <th>Delete page <td> <form name="deleteForm" action="<wiki:Link format="url" context="<%=WikiContext.DELETE%>" />" method="post" accept-charset="<wiki:ContentEncoding />" onsubmit="return confirmDelete()"> <input type="submit" name="delete-all" value="Delete entire page"/> </form> </td> </tr> </wiki:Permission> <tr> <td valign="top">Page revision history <td> <wiki:CheckVersion mode="first">Only one version <wiki:CheckVersion mode="notfirst"> <form> <select id="infoselect" name="infoselect" onchange="location.replace(this[this.selectedIndex].value)" > <% int startofblock = latestVersion-size+1; int endofblock = latestVersion; boolean selected = false; if( latestVersion > size ) // more than one item in dropdown list { %> <option value=" Show all revisions from <%= latestVersion %> down to 1 </option> <% } while( endofblock > 0 ) { if( startofblock < 1 ) { startofblock = 1; } selected = ( (start >= startofblock) && (start <= endofblock) ); if( selected ) start = startofblock; //defensive %> <option value="" <%= (selected ? "selected='selected'" : "") %> > Show <%= ((startofblock == 1) ? "first" : Integer.toString(size) ) %> revisions from <%=endofblock%> to <%=startofblock %> </option> <% //if( startofblock == 1) startofblock = 0; startofblock -= size; endofblock -= size; } %> </select> </form> </wiki:CheckVersion> </td> </tr> </table> <wiki:CheckVersion mode="notfirst"> <div id="versionhistory" class="zebra-table"> <table class="wikitable"> <tr> <th>Version <th>Date <th>Author <th>Size <th>Changes ... </tr> <wiki:HistoryIterator id="currentPage"> <% if( (start == -1) || ((currentPage.getVersion() >= start) && (currentPage.getVersion() < start+size)) ) { %> <tr> <td> <wiki:LinkTo version="<%=Integer.toString(currentPage.getVersion())%>"> <wiki:PageVersion/> </wiki:LinkTo> </td> <td> <td> <td> <td> <wiki:CheckVersion mode="notfirst"> <wiki:DiffLink version="current" newVersion="previous">to previous <wiki:CheckVersion mode="notlatest"> | </wiki:CheckVersion> <wiki:CheckVersion mode="notlatest"> <wiki:DiffLink version="latest" newVersion="current">to last </wiki:CheckVersion> </td> </tr> <% String changeNote = (String)currentPage.getAttribute(WikiPage.CHANGENOTE); if( changeNote != null ) { %> <tr>
<% } %> <% } %> </wiki:HistoryIterator> </table> </div> <%-- versionhistory --%> </wiki:CheckVersion> </wiki:Tab> <wiki:Tab id="referingto" title="Outgoing Links"> <p>body

</wiki:Tab> <wiki:Tab id="referencedby" title="Incoming Links"> <p>

<wiki:Plugin plugin="ReferringPagesPlugin" args="before='*' after='\n' " >body </wiki:Tab> <wiki:Tab id="attachments" title="Attachments"> <wiki:Include page="AttachmentTab.jsp"/> </wiki:Tab> </wiki:PageType> <%-- part 2 : attachments --%> <wiki:PageType type="attachment"> <wiki:Tab id="infocontent" title="Attachment Info"> <table> <tr> <th>Attachment Name <td> <wiki:LinkToParent> / </td> </tr> <tr> <th>Last modified <td> by </tr> <tr> <th>Current version <td>No versions. </tr> <tr> <th>Page feed <td> <img src=" </a> </td> </tr> <wiki:Permission permission="upload"> <tr> <th>Upload new version <td> <form action=" <%-- In order to update this attachment with a newer version, please select a file name (click "Choose" button), then click on "Update". --%> <input type="file" name="content" /> <br /> Change note: <input type="text" name="changenote" maxlength="80" width="60" /> <br /> <input type="submit" name="upload" value="Upload new attachment" /> <input type="hidden" name="action" value="upload" /> <input type="hidden" name="nextpage" value=" </form> </td> </tr> </wiki:Permission> <wiki:Permission permission="delete"> <tr> <th>Delete attachment <td> <form name="deleteForm" action="<wiki:Link format='url' context='<%=WikiContext.DELETE%>' />" method="post" accept-charset="<wiki:ContentEncoding />" onsubmit="return confirmDelete()"> <input type="submit" name="delete-all" value="Delete attachment"/> </form> </td> </tr> </wiki:Permission> <tr> <th>Page Revision History <td> <wiki:CheckVersion mode="first">Only one version <wiki:CheckVersion mode="notfirst"> <form action=""> <select id="infoselect" name="infoselect" onchange="location.replace(this[this.selectedIndex].value)" > <% int startofblock = latestVersion-size+1; int endofblock = latestVersion; boolean selected = false; if( latestVersion > size ) // more than one item in dropdown list { %> <option value="" <%= ( (start == -1) ? "selected='selected'" : "") %> > Show all revisions from <%= latestVersion %> down to 1 </option> <% } while( endofblock > 0 ) { if( startofblock < 1 ) { startofblock = 1; } selected = ( (start >= startofblock) && (start <= endofblock) ); if( selected ) start = startofblock; //defensive %> <option value="" <%= (selected ? "selected='selected'" : "") %> > Show <%= ((startofblock == 1) ? "first" : Integer.toString(size) ) %> revisions from <%=endofblock%> to <%=startofblock %> </option> <% //if( startofblock == 1) startofblock = 0; startofblock -= size; endofblock -= size; } %> </select> </form> </wiki:CheckVersion> </td> </tr> </table> <wiki:CheckVersion mode="notfirst"> <div id="versionhistory" class="zebra-table"> <table class="wikitable"> <tr> <th>Version <th>Date <th>Author <th>Size </tr> <wiki:HistoryIterator id="currentPage"> <% if( (start == -1) || ((currentPage.getVersion() >= start) && (currentPage.getVersion() < start+size)) ) { %> <tr> <td> <wiki:LinkTo version="<%=Integer.toString(currentPage.getVersion())%>"> <wiki:PageVersion/> </wiki:LinkTo> </td> <td> <td> <td> </tr> <% String changeNote = (String)currentPage.getAttribute(WikiPage.CHANGENOTE); if( changeNote != null ) { %> <tr> <% } %> <% } %> </wiki:HistoryIterator> </table> </div> <%-- versionhistory --%> </wiki:CheckVersion> <div style="clear:both; height:0px;" > </wiki:Tab> </wiki:PageType> </wiki:TabbedSection> </wiki:PageExists> <wiki:NoSuchPage> This page does not exist. Why don't you go and <wiki:EditLink>create it? </wiki:NoSuchPage>

Other jforum examples (source code examples)

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

jforum example source code file (InfoContent.jsp)

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

delete, info, links, links, only, rename, rss, rss, show, show, string, string, update, what

The jforum InfoContent.jsp source code

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

<%
  /* see commonheader.jsp */
  String prefDateFormat = (String) session.getAttribute("prefDateFormat");
  String prefTimeZone   = (String) session.getAttribute("prefTimeZone");

  /* cookie settings */
  int size = 10; //default #revisions shown per page
  String s;
  s = (String)request.getParameter("size");  if( s != null ) size = Integer.parseInt(s);
  //String dateformat = "EEE, dd-MMM-yyyy [hh:mm]";


  WikiContext c = WikiContext.findContext( pageContext );
  
  int latestVersion = 0;
  try
  {
    latestVersion = c.getPage().getVersion();
  }
  catch( Exception  e )  { /* dont care */ }

  int start = latestVersion;
  s = (String)request.getParameter("start"); if( s != null ) start = Integer.parseInt(s);

%>

<script language="javascript" type="text/javascript">
function confirmDelete()
{
  var reallydelete = confirm("Please confirm that you want to delete content permanently!");

  return reallydelete;
}
</script>

<wiki:PageExists>

<wiki:TabbedSection defaultTab="<%=request.getParameter("tab")%>">
<%-- part 1 : normal wiki pages --%>

<wiki:PageType type="page">

<wiki:Tab id="infocontent" title="Page Info">

   <table cellspacing="4">
       <tr>
           <td>Page name
 <%=changeNote%>
 <%=changeNote%>
... 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.