NAME XApperator::View - View related functions for the XApperator MVC framework VERSION 1.0.2 This Release: 11/Dec/2007 Original Release: 20/Feb/2007 AUTHOR Dean Stringer (deeknow @ pobox . com) DESCRIPTION The subs in this module are invoked mostly by the processActions() method of the controller to build and return various elements of the user-interface, as well render content out to the file-system in publish modes. PUBLIC SUBS buildMenu() build the UI section that lets a user select a set of records grouped by some foreign key, this could be a dropdown select list or maybe a serious of radio buttons, its up to the developer to tweak the menu.xslt to suit if the out-of-box layout doesn't suit buildViewContent() in view mode so add the foreign keys and data and do a transform passing in all the xslt paramaters we need in view mode buildEditContent() in view mode so add the foreign keys and data and do a transform passing in all the xslt paramaters we need in edit modes buildSearchContent() in search mode so add the foreign keys and data and do a transform passing in all the xslt paramaters we need in search mode content() returns the XSLT rendering of the edit UI performed previously during a call to processActions() . Used as method so developer of controller.cgi doesnt need to reference any internal property value. Can also be used to set the content value to something other than the XSLT result contentHeader() header content output before the actual body of the application, this is generally an xhtml doctype, a head section, opening body tag and div container for the actual page body contentHeadSection() content that will be inserted in the rendered HEAD section if required. normally called by contentHeader but may also be used where a full contentHeader is not required if the developer is using their own templating system, in which case all they need is the HEAD section content contentSelectmenu() returns the HTML rendering of the foreign key select menu. used as method so developer of controller.cgi doesnt need to reference any internal property value contentFooter() contentDebugInfo() error() sets or returns the text of the any processing error. used as method so developer of controller.cgi doesnt need to reference any internal property value publish() Render the active data file out through the nominated XSLT template. The XSLT template location is determined by the 'transform' attribute of the actions/publish element in the config.xml file. The target output location is determined by the 'folder' attribute of the same config element. The data is transformed through the XSLT template to the target folder and a filename that is a combination of key value and file 'extension' (also from actions/publish). If the transform fails for any reason the app dies, if all is well return with '1' publishAll() Called by processActions() if the user has clicked 'Publish All' and makes a call to publish() for each key in the main KEYS.xml file. Saves the current fkey value and restores it at the end of the call. Returns the total number of files published. SEE ALSO XML::LibXSLT, XML::LibXML, XApperator, XApperator::Model, XApperator::Controller, XApperator::Utils