[Seaside] Seaside + SSP

Stephen Pair seaside@lists.squeakfoundation.org
Thu Jan 16 21:07:20 CET 2003


This is a multi-part message in MIME format.

------=_NextPart_000_000D_01C2BD79.592F4DC0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

With the attached filein, you can use SSP formatted methods in your
Seaside #renderContentOn: (and similar) methods.  The filein adds the
methods #nextPut: and #nextPutAll: to WAHtmlGenerator.  So, for example,
you could write a method that looks like:

-------
renderContentOn: html
<ssp on: html>

<p><h1>Hello, I am an instance of <%= self class name %>!</h1>
-------

The same thing would ordinarily be accomplished in Seaside as follows:

-------
renderContentOn: html

	html paragraph.
	html heading: [
		html text: 'Hello, I am an instance of ';
		html text: self class name.
		html text: '!'.
	].
-------

This of course bypasses the formatting supplied by the WAHtmlGenerator,
which would eliminate the possibility of re-directing the render method
to some non-html output.  What would be really cool is if we could make
a parser that would parse the HTML (or other markup) in the SSP method
and spit out bytecodes that call methods on the HTML generator.  Then
you could conventiently write rendering methods in marked up text, yet
still be able to re-direct output to a different markup language.  Don't
think I'll try that anytime soon however.

- Stephen  

------=_NextPart_000_000D_01C2BD79.592F4DC0
Content-Type: application/octet-stream;
	name="WAHtmlGenerator-#sea-ssp.st"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="WAHtmlGenerator-#sea-ssp.st"

'From Squeak3.4beta of ''1 December 2002'' [latest update: #5138] on 16 =
January 2003 at 3:50:26 pm'!=0D=0D=0D!WAHtmlGenerator methodsFor: =
'*sea-ssp' stamp: 'svp 1/16/2003 15:47'!=0DnextPut: anObject=0D=0D	=
stream nextPut: anObject! !=0D=0D!WAHtmlGenerator methodsFor: '*sea-ssp' =
stamp: 'svp 1/16/2003 15:46'!=0DnextPutAll: anObject=0D=0D	stream =
nextPutAll: anObject! !=0D
------=_NextPart_000_000D_01C2BD79.592F4DC0--




More information about the Seaside mailing list