[Seaside] dynamically chosen subcomponents

Avi Bryant avi@beta4.com
Tue, 4 Jun 2002 13:19:06 -0700 (PDT)

On Tue, 4 Jun 2002, Tim Rowledge wrote:

> I had this probably mad idea about (ab)using the addBindingsTo: like
> this
> template elementNamed: 'questionPane')
> 	class: currentQuestion paneClass;
> 	set: ...... etc

Not so mad.  The way I will eventually probably solve this is by allowing
something like

(template elementNamed: 'questionPane')
  class: [currentQuestion paneClass];

> Another possibility that occurs to me is using frames for this; that way
> the url for each question would be somewhat specific to its
> class/type/needs and would have a quite separate template (?). If this
> is plausible, I guess you could make a frame subcomponent that would be
> usable as the target frame.

Well, you could, but communicating between different frames is a *lot*
harder than communication between parent and subcomponent.

By the way, did you look at my UntemplatedComponent example?  I'm curious
if that way of doing things is more to your liking.