<%-- #BeginRZ-PageHeader --%> <%@ page language="java" %> <%@ include file = "/util/setup_editlist_header.jsp" %> <%@ page import ="java.util.regex.Matcher,java.util.regex.Pattern"%> <%-- #EndRZ-PageHeader --%> <% //xxx; //compile error %> <% //Integer.parseInt("NaN"); //simulate runtime error %> Page History <% String module=StringUtils.getParameter(request,"module"); // fields=header{Page Header},tip{tip} String fields=StringUtils.getParameter(request,"fields"); String[] userFields = StringUtils.split(fields,","); String[] userHeading = new String[userFields.length]; for (int i=0; i <%--#RevizeProperties: USE REVIZE MENU (DOCUMENT PROPERTIES) TO EDIT DATA BELOW: status=new options=@@options@@ server=192.168.10.101:8080 projectName=demositeIII label= location=history-editlist.jsp version= docType=editpage subType=list moduleName= fieldName= channels=| description= --%> <%@ include file="/util/setup_editlist_javascript.jsp" %>
To copy a previous version of the page just click on the the "Copy This Version" button next to the version you would like
<%int cnt=0; while ( rz.listnext() ){ cnt++; //if(cnt > 20) break; %> <% String color = (rz.listindex % 2 == 0 ? "#FFFFFF" : "#DDDDDD"); %> <%}%>
Version Activation / Expiration User Id Modified <% if (userFields.length > 1) {%> Content <% }else{ %> <%=userHeading[0]%> <% } %>

Version #<%=rz.version%>

<%-- #BeginRZ-ActionImage --%> <%-- Option:type=EditListEditVersion --%> <%-- Option:imageSrcURL=../images/edit/edit.jpg --%> <%-- Option:caption=Edit --%> <%-- #BeginRZ-ActionImage --%> <%-- Option:type=EditListViewButton --%> <%-- Option:imageSrcURL=../images/edit/copy.jpg --%> <%-- Option:caption=Edit --%> <%-- #EndRZ-ActionImage --%>
 
 

 
<% for (int i=0; i <%} %>
<% if (userFields.length > 1) {%> <%=userHeading[i]%>:  <% } %> <%-- This Scriplet is used to modify the src path of the Images for the History Page. Regular Expression has been used to match the src and modified.--%> <%--Modified By Om:03/09/2009--%> <% String htmlValue = new String(rz.content); StringBuffer finalBuff = new StringBuffer(); int linkBeg = htmlValue.indexOf("src"); int hrefBeg = htmlValue.indexOf("0) { Matcher stMatcher = stLinkPat.matcher(htmlBuff); if(stMatcher.find()) { pos = stMatcher.start(); } if(pos==-1 && htmlBuff!=null && htmlBuff.length()>0) { finalBuff.append(htmlBuff.toString()); } if(pos ==-1) break; try { if(pos!=-1 ) { finalBuff = finalBuff.append(htmlBuff.toString().substring(0,pos+5)); pos = pos+5; finalBuff.append("/revize/repository/"); finalBuff.append(rz.webspace); finalBuff.append("/"); htmlBuff = htmlBuff.delete(0, pos); } }catch(Exception e) { e.printStackTrace(); } } }while(pos != -1); if(hrefBeg == -1) out.println(finalBuff); else{ StringBuffer hrefBuff = new StringBuffer(finalBuff.toString()); StringBuffer outputBuff = new StringBuffer(); int hrefPos = 0; do{ hrefPos = -1; Pattern stLinkPat = Pattern.compile("0) { Matcher stMatcher = stLinkPat.matcher(hrefBuff); if(stMatcher.find()) { hrefPos = stMatcher.start(); } if(hrefPos==-1 && hrefBuff!=null && hrefBuff.length()>0) { outputBuff.append(hrefBuff.toString()); } if(hrefPos ==-1) break; try { if(hrefPos!=-1 ) { outputBuff = outputBuff.append(hrefBuff.toString().substring(0,hrefPos+9)); hrefPos = hrefPos+9; hrefBuff = hrefBuff.delete(0, hrefPos); if(hrefBuff.indexOf("http")!=0){ outputBuff.append("/revize/repository/"); outputBuff.append(rz.webspace); outputBuff.append("/"); } } }catch(Exception e) { e.printStackTrace(); } } }while(hrefPos != -1); out.println(outputBuff);//If there is no chnage required for th source } }else out.println(htmlValue);//output after modifying the image source %>