[Seaside] Stupid anchor question

Philippe Marschall philippe.marschall at gmail.com
Tue Aug 14 17:53:55 UTC 2007

2007/8/14, Leandro Pérez <lperez at lifia.info.unlp.edu.ar>:
> Hello,
> I want to do this: when clicking on an anchor, something else must be
> displayed on a new page..just like simple html
> MyComponent>>renderContentOn: html
> html anchor
>     callback:[self renderSomethingElseOn:html];
>     with:'go to somewhere else'
> MyComponent>>renderSomethingElseOn:html
> html div with:'this is something else'
> and I always get this exception
> Message not understood: #openTag:attributes:closed:
> I guess the whole idea might be wrong... is it?

Yes, you mix the callback and the rendering phase. In the callback
phase your "actions" are executed, you can do no rendering there. Your
html argument will be invalid.

The easiest way to make your example work is to create a new Component
for 'this is something else' called SomethingElseComponent (or
something else) the action triggered by the link would then do a
#call: on this new component. This temporarily replaces MyComponent
with SomethingElseComponent until you send #answer: in

MyComponent>>renderContentOn: html
    html anchor
        callback:[ self renderSomethingElse ];
        with:'go to somewhere else'

    self call: SomethingElseComponent new

SomethingElseComponent >> #renderContentOn: html
    html div with:'this is something else'


> Thanks!
> --
> View this message in context: http://www.nabble.com/Stupid-anchor-question-tf4267248.html#a12144350
> Sent from the Squeak - Seaside mailing list archive at Nabble.com.
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the seaside mailing list