[Seaside] WYSIWYG text editor

Torsten Bergmann astares at gmx.de
Tue Feb 23 10:58:25 UTC 2010

>I don't wanna be annoying, but I really can't find any specific info on
>embedding fairly complex javascript apps in Seaside.

Because that depends on the kind of script you want to include. Is it
a simple script, a jquery plugin, ...

Typically you have a WAComponent subclass and there are
mainly two basic ways to wrap a javascript:

  1) Just implement a #script method on the instance side of
     your component class returning a String with your script. 
     This is automatically sent to the client but the #script method
     is more intended for rapid prototyping.

  2) Upload your scripts to an own custom WAFileLibrary subclass using
     the config tool and either 

      2a) implement #selectorsToInclude to return all the (script) methods 
         that should always sent to the client:
                    ^#(barJs fooJs)

         You also have to register the lib with you app to make this work:

                  app := WAAdmin 
			register: self
			asApplicationAt: 'myapp'.
         	         app addLibrary: MyOwnFileLibrary.


     2b) select the script you want to send to the client in
         the updateRoot method:

          updateRoot: anHtmlRoot
	      super updateRoot: anHtmlRoot.
               anHtmlRoot javascript url: MyOwnFileLibrary / #barJs.

         You can also use an URL here if you want to test with the scripts
         of the original location:

             anHtmlRoot javascript url: 'http://foo.com/bar.js'

If you want to wrap a script that comes as a JQuery Plugin I would point
you to the JQueryWidgetBox project for Seaside:


Just click on Wiki there.

GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

More information about the seaside mailing list