On Thursday 05 April 2007 06:05:54 William Cox wrote: > Tim, > stuff based on components to be called later. things like bringing in > js scripts and css files if certain components need them. heres an
I used regular OO in Mason, i.e. for JavaScript, CSS and header meta info, I call something like SELF:javascript. In a component that calls other subcomponents, that javascript method calls the same method on the subcomponents. It makes a little replication of the call chain code, but it's manageable. This makes it essentially a "multi-pass" page builder, first pass for header metadata, then for javascript. For CSS, it is basically handled in the meta, so that I @import the appropriate files. The main component (my autohandler) implements empty defaults for all these methods, so that you need not add them in case there is no meta or javascript to add to the current page. That is an area where I was always struggling, and I think I have not found yet the proper idiom to do it in Mason. I was wondering also if I could use the buffers for this: call the components, and put the meta stuff into the meta buffer, the javascript into the javascript buffer, etc. Then, the top level component (an autohandler) would string these buffers together into the final page. --paf ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users