[Seaside] how to use WAFormDecoration

Lukas Renggli renggli at gmail.com
Sun Apr 9 17:52:40 UTC 2006

> I am trying to figure out how to use WAFormDecoration  ( I am trying to
> complete exercise 34 in Lukas Renggli's tutorial - a great tutorial).

Thanks ;-)

> The
> only example in my image that I could find that uses WAFormDecoration is
> WAFormDialog but it does not really help my understanding.

Hi Frank,

I guess exercise 34 is about adding decoration to a component (I don't
exactly know because I don't have the exercises ready). So what you
probably want to do is to decorate your editor with a form and with
buttons, exactly what WAFormDecoration is there for.

Add something like the following code to the #initialize method of
your component:

	super initialize.
	self addDecoration: (WAFormDecoration new
		buttons: #( ok cancel );

The setter #buttons defines the button-selectors that will be called
on your component, this means you should also implement
SomeComponent>>ok and SomeComponent>>cancel accordingly.

Hope this helps,

Lukas Renggli

More information about the Seaside mailing list