[Seaside] Styles and Overiding HtmlBuilder

Keith P. Hodges keith.hodges at cheerful.com
Thu Mar 27 20:04:21 CET 2003


Some thoughts,

I have been trying to throw together a simple table and experiment 
with #style to fit things together.
------
I found that the table row labels have cssClass: label, so I figured 
it was only fair to have

tableHeadings: aCollection
      self cssClass: 'heading'.
	self tableRow: [aCollection do: [:ea | self tableHeading: ea]]
-------

I was thinking, what if I dont like the way that HtmlBuilder 
constructs things, perhaps I would like to pas control over to 
specialised TableBuilder, MyTableBuilder, FormBuilder etc.

I found this code - where a more specialised builder is invoked, but 
somehow I have a gut feeling that there should be a more elegant way 
of doing this.

renderContentOn: html
	| wiki |
	wiki := (WAWikiRenderer new)
				copyFrom: html;
 
		linkBlock: [:s | self link: s].
	wiki
		anchorOn: #edit of: self;
		swikify: (self textAt: self pageName)

------
best I could come up with on the spur of the moment

html use: TableBuilder with: [:table |
	table from:  an2DArray
]
------

any thoughts

Keith


More information about the Seaside mailing list