Re: Programmatic parents?

Iwan Vosloo <[email protected]> Mon, 07 Aug 2006 15:25:59 +0200
Newsgroups gmane.comp.python.spyce.general
Message-ID <[email protected]>
Hi Philip,

thanks, I know how to invoke Spyce programmatically, and to pass
parameters.  (In fact the mail message you link to just so happens to
have been an answer to me of last year... :-) )

You basically give a kind of implementation of :
> On Aug 6, 2006, at 12:47 PM, Iwan Vosloo wrote:
> > How can I do this?  Would I have to first render the child, then render
> > the parent template, passing it.. the child somehow?

But I'm looking for a better way of doing it.  The way you pass the
child - as a file in the parameter 'FilenameToInclude' is also not using
the normal parent mechanism of Spyce at all.  (Unless I misunderstand
something.)  Also, this means that you render both the "parent" and the
"child" separately, and have to buffer them until you send the result
off somewhere...

The best solution I've been able to think of is to call
spyce.spyceFileHandler once to render the child, passing it a
spyceconfig in which I give the filename of the parent as the
'defaultparent'.

But then the child still needs to specify the <spy:parent> tag (not a
big problem).  And, the child needs to pass whatever the parent would
need via that tag.  And this latter thing is a big problem - because the
children don't know in which context (parent) they will be rendered or
what they should pass to it. 

So, if I could pass a config with defaultparent set to what I choose,
_and_ can somehow pass parameters to _the parent_, that would solve the
issue...  But my understanding of tag libraries is not good enough to
figure this out (yet)...

-i




-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642