John McNally wrote:
> I like Screens to be able to add javascipt to the head, but I guess this is
> not absolutely necessary. Is data.setTitle(x) called at this point, (I am
> just making a lazy question, not too important)? And what if my screen
> would like to implement an onLoad event handler?
Screen class execution and screen template rendering are perfrormed before
Layout rendering, so the screen class had a chance to run data.setTitle() and
screen template could run $data.setTitle() too.
Embeding javascript is also possible to implement - all is between the programer
and web designer. For example: the screen class could drop a Hastable containing
keys 'functions', 'onCommit', 'onLoad' under the key 'script' into the context,
and the designer made a layout template this way
<html>
<head>
<script language="javascript">
$script.functions
function fun() {
// designers js
}
function sendForm() {
// designers js
$script.onCommit
}
</script>
</head>
<body onLoad="fun();$script.onLoad">
a page with a form ....
</body>
</html>
> The original thinking was to limit the available information in the layout
> context, so that it is used appropriately and did not contain a lot of
> dynamic content.
People will find a way to misuse your code no matter how hard you try.
The good part is that it's them who'll be maintaing the resulting mess. :)
> I have been reworking the template framework and one of the things I have done
> is get back to essentially one Page which contains the build method (I hope,
> I have not tested things, yet) where child WebMacroSitePage and other
> template Pages override a method to supply the context.
I'd really like to learn more about this new framework, because rigtht now
integrating WebMacro with FreeMarker sounds to me like fitting a square peg into
a round hole...
> Since there is no
> WebMacroPage that is different than a WebMacroSitePage I would prefer to
> lose the term.
+1
Rafal
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]