[Seaside] dynamically chosen subcomponents

Tim Rowledge tim@sumeru.stanford.edu
Tue, 04 Jun 2002 12:17:33 -0700

Avi Bryant <avi@beta4.com> is claimed by the authorities to have written:

> On Tue, 4 Jun 2002, Tim Rowledge wrote:
> > My initial idea for handling this is to have various classes of
> > subcomponent that copes with each type of question. How can I make
> > seaside deal with this neatly?
> Neatly? You can't.  This is currently one of the major annoyances I have
> with Seaside, although I do plan to fix it soon (the need for (locals
> at: #each) in your last message is only a minor annoyance ;-).

I had this probably mad idea about (ab)using the addBindingsTo: like

template elementNamed: 'questionPane')
	class: currentQuestion paneClass;
	set: ...... etc

which of course doesn't work because the template is built and cached.
Maybe we could specify 'volatile' bindings and thereby have them rebuilt
each time the page is displayed?

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.

Tim Rowledge, tim@sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Software is to computers as yeast is to dough.  - Chuck Bradshaw