[Bese-devel] templating systems

Marco Baringer mb at bese.it
Sun Jun 12 12:18:53 UTC 2005


hi,

  this came up in a private discussion and i think it's worth
  repeating:

  ucw comes with out-of-the-box support for yaclml and, since i have
  written and activly use yaclml, you can always be sure that ucw and
  yaclml either work together or will work together very very
  soon. however this does not in any way mean that you _must_ use
  yaclml (or tal) if you don't like them (not everyone does). you just
  need to know about a few 'simple' forms:

  (compute-url COMPONENT
               :action-id (make-new-action (context.current-frame *context*)
                                           ACTION))

  this returns a relative URL (see src/helpers.lisp) which, when
  requested, will cause the function ACTION to be called.

  You can use the result of (make-new-action ...) in forms by simply
  setting the parameter named +action-parameter-name+ (which is, and
  has always been, "a"). in forms you also need to set the
  +frame-parameter-name+ ("f") and +session-parameter-name+ ("s")
  +parameters.

  (make-new-action (context.current-frame *context*)
                   CALLBACK)

  this returns a string which, when used as a GET or POST parameter,
  will cause CALLBACK to be called. CALLBACK will be passed the string
  corresponding to whatever the client sent for that parameter.

  <ucw:select is a macro built on top of make-new-action, if you use
  another templating system you'll need to reimplement this feature
  (cut 'n paste from src/yaclml/ucw-tags.lisp and you should be fine).

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen



More information about the bese-devel mailing list