[Seaside] What's the difference and why??

Rick Flower rickf at ca-flower.com
Sun Feb 26 02:20:38 UTC 2006

Philippe Marschall wrote:
>>         html listItem: [html anchorWithAction: [self renderMain: html]
>> text: 'Home'.].
> Does this really work? You do rendering in a callback block. This
> doesn't make sense.
Yes, it seemed to work for me.. Now, whether or not it's right is 
certainly up for discussion..
I'm still both a Seaside and Smalltalk newbie (as I mentioned before), 
so if I'm doing something
wrong, please let me know..  Any ideas on how to write such a set of 
code and where to put
it (or not to) would be greatly appreciated!
> html is the rendering context on which you render. If you come from a
> Java background this is very much like the #paintComponent(Graphics)
> method. You can store it in an instance variable at the beginning of
> #renderContentOn: instead of passing it around to every render method,
> but this in general not done.
Ok I think..  I don't have much of a Java background -- mostly C/C++.. 
I'm not sure I follow
completely here. Ideally, what I'm looking to do is have a method in my 
WATask derived
class so that it can pass a set of generated page links to each "task" 
(e.g. update contact info,
main page, generate reports, etc.. These links will be common to each 
page and I'd rather
not embed them into each class that does the actions I want (thereby 
duplicating code)

-- Rick

More information about the Seaside mailing list