Edit Text          
  
   
 


Get Action Creates an edit page for the requested page attachment

Get Parameters

  • pageName - The page the file is attached to
  • fileName - The file to be edited

Server Side Javascript for GET method

if(typeof(pageName)=="undefined") { transaction.setResult(transaction.SHOW_PAGE); } else { template = file.getAttachment("/OpenForum/Actions/EditText","editText.html.template"); fileName = transaction.getParameter("fileName"); source = file.getAttachment(pageName,fileName,false); if(source==null) { source=""; } source = source.replace("&","&amp;").replace("<","&lt;").replace(">","&gt;"); data = js.get2DStringArrayAsHashtable( [["pageName",pageName],["fileName",fileName],["source",source]] ); pageData = js.getStringGenerator().generateStringWithMask( template,data,'&',';' ); transaction.sendPage( wiki.buildPage("Edit Text",pageData) ); }
by Admin on 21/04/2008 at 10:08 PM