[Seaside] Is there an easy way to decorate Canvas elements to incorporate other toolkits?

Tim M 365nice at gmail.com
Thu May 15 12:37:57 UTC 2008

I am new to Seaside, and am playing around and kicking the tires.

I wanted to do a demo for some of my colleagues and one of the things we 
played around with a few weeks ago was Dojo (which really impressed quite 
a few people).

I have read posts about how Dojo is not the way to go - however as part of 
my playing around with the technology I wanted to see if I could incoporate 
some Dojo look and feel stuff into my simple Seaside tutorial app.

One thing that struck me, is that my app is happily rendering some forms 
using things like:

   html textInput callback: [:value | self user userName: value]; value: 
self user userName]

To get a Dojo look and feel all I need to do is render html that looks a 
bit like the following:
   <input type="text" length="20" name="first"  dojoType="dijit.form.TextBox">

So it occurs to me that the html canvas that I am passing in to my seaside 
components could be decorated (or have a different rendering strategy) in 
some way so that it outputs things in a different manner.

This sounds like it should be easy - however my first look at the world of 
WARenderCanvas doesn't make it look like rendering is done with a strategy 
pattern in mind?

While I could add extra dojo methods to the canvas - it seems like I should 
be able to plug in a different strategy but code like:

	^ self brush: WATextInputTag new

Seems like its all hard coded without this in mind.

Is there some easy way to do this another way? I suppose I could wrap the 
Canvas in something else that doesn't forward methods like #textInput and 
does something else - but I'm not sure where I hook in to do that.

Any tips or starting points would be greatly appreciated.


More information about the seaside mailing list