;ò µPEc@sdklZydkTeZWnej o eZnXydklZWnej o e ZnXdefd„ƒYZ dS((sPage(s*(s AppServersCPagecBstZdZdddgZd„Zd„Zd„Zd„Zd„Zd „Z d „Z d „Z e e e d „Ze e e d „Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zeedƒ o d„Znd„Zd„Zd„ZgZe e d„ZRS(sÛ CPage is an alternative to WebKit.Page, which adds support for Components. Components can contain functionality like user logins, widgets and layout generation, template handling... whatever. Components for a servlet are listed in the components class variable, like:: class SitePage(CPage): components = [UserComponent(), OtherFancyComponent()] You can also run ``servlet.addComponent(component)``. Components can respond to events, and add methods to the servlet. See the ServletComponent class for more about writing components. To fire your own event use callEvent, like:: self.callEvent('eventname', ...) Use whatever arguments you want. Interested components will implement a method eventnameEvent(), which will be passed those arguments. callEvent will return a false value if a component wants to abort this event (because the component deals with the event on its own). sawakessleeps exceptioncCs´ti|ƒg|_h|_x|iD]}g|i||i dtƒ|jp%|id|ƒo|id|ƒo|i|ƒdSq×q×W|iƒdS(sø Handles actions if an ``_action_`` or ``_action_XXX`` field is defined, otherwise invokes `writeHTML`. Invoked by both `respondToGet` and `respondToPost`. Copied with slight modification from Page._respond sOldStyleActionss_action_Ns=Action '%s' is not in the public list of actions, %s, for %s.s _action_%ss _action_%s.xs _action_%s.y(s transactionsrequestsreqs applicationssettingsFalseshasFieldsselfsmethodNameForActionsfieldsactions _actionSetsactionsshas_keys preActionsapplysgetattrs postActions PageErrorskeyssNones handleActions defaultAction(sselfs transactionsreqsactionssaction((sQ/mnt/gmirror/ports/www/py-webware-component/work/Component-0.2/Component/cpage.pys_respondäs" )    U  s defaultActioncCs|iƒdS(N(sselfs writeHTML(sself((sQ/mnt/gmirror/ports/www/py-webware-component/work/Component-0.2/Component/cpage.pys defaultAction scCs…t|dƒ oih|_x!|iƒD]}d|i|%s

%s

slocationsSee %ss(sselfsresponsesress setHeadersstrsstatussheaderssitemssnamesvaluesbodyswritesgets endResponse(sselfsstatussheaderssbodysnamesressvalue((sQ/mnt/gmirror/ports/www/py-webware-component/work/Component-0.2/Component/cpage.pyssendResponseAndEnds   ( s__name__s __module__s__doc__s_standardEventss__init__sactionss addComponents callEventsawakessleepsrunTransactionshandleExceptionsFalsesNones servletLinks linkToSelfs writeHeaders writeFooterstitles viewMethodsviewssetViewswriteBodyPartss_respondshasattrsPages defaultActions _actionSets preActions postActions componentsssendResponseAndEnd(((sQ/mnt/gmirror/ports/www/py-webware-component/work/Component-0.2/Component/cpage.pysCPage s6        !      %   N( s WebKit.PagesPagesWebKit.HTTPExceptionssTrues hasExceptionss ImportErrorsFalsesWebKits AppServersNonesCPage(s hasExceptionssCPages AppServersPage((sQ/mnt/gmirror/ports/www/py-webware-component/work/Component-0.2/Component/cpage.pys?s