<%-- #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 %> History <%--#RevizeProperties: USE REVIZE MENU (DOCUMENT PROPERTIES) TO EDIT DATA BELOW: status=new server=localhost:8080 projectName=demositeIII label= location=history-editlist.jsp version= docType=editpage subType=list moduleName= fieldName= channels=| description= --%> <% 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 <%@ include file="/util/setup_editlist_javascript.jsp" %>
<%-- #BeginRZ-ActionImage --%> <%-- Option:type=EditListEditVersion --%> <%-- Option:imageSrcURL=../images/edit/new.jpg --%> <%-- Option:caption=Edit --%> <%-- #EndRZ-ActionImage --%> Scheduled / Expired Content <%-- #BeginRZ-ActionImage --%> <%-- Option:type=EditListExitImage --%> <%-- Option:forwardURL=history-editform.jsp --%> <%-- Option:imageSrcURL=../images/edit/exit.jpg --%> <%-- #EndRZ-ActionImage --%>
Creates a New Version Uses a copy of the selected version to create a new version
<% while ( rz.listnext() ){ %> <% String color = (rz.listindex % 2 == 0 ? "#FFFFFF" : "#DDDDDD"); %> <%}%>
Version  Activation
 Expiration
 User Id
 Modified
<% if (userFields.length > 1) {%> Content <% }else{ %>  <%=userHeading[0]%> <% } %>
<%=rz.version%>
<%-- #BeginRZ-ActionImage --%> <%-- Option:type=EditListEditVersion --%> <%-- Option:imageSrcURL=../images/edit/edit.jpg --%> <%-- Option:caption=Edit --%> <%-- #EndRZ-ActionImage --%>   <%-- #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.--%> <% 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); } }else out.println(htmlValue); %>