Get Attachment As Xml          
  
   
 


Get Action Returns an Xml attachment as Javascript Xml Object

Get Parameters

  • pageName - The page the xml is attached to.
  • fileName - The xml file name
  • viewName - The xml view to apply to the xml

Server Side Javascript for GET method

if(typeof(pageName)=="undefined") { transaction.setResult(transaction.SHOW_PAGE); } else { user = transaction.getUser(); fileName = transaction.getParameter("fileName"); viewName = transaction.getParameter("viewName"); if(viewName==null) { viewName = "/OpenForum/Actions/GetAttachmentAsXml/default-view.xml"; } xml = js.getPageAttachmentAsXml(pageName,fileName); xmlView = js.getPageAttachmentAsXml(viewName); page = js.getXmlAsJS(xml,xmlView); transaction.sendPage(page); }
by Admin on 21/04/2008 at 10:09 PM