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("&","&").replace("<","<").replace(">",">");
data = js.get2DStringArrayAsHashtable(
[["pageName",pageName],["fileName",fileName],["source",source]] );
pageData = js.getStringGenerator().generateStringWithMask(
template,data,'&',';' );
transaction.sendPage( wiki.buildPage("Edit Text",pageData) );
}