[Seaside] anchors behaving like buttons?

Nevin Pratt nevin at smalltalkpro.com
Fri Mar 28 07:13:49 CET 2003



Nevin Pratt wrote:

> That was originally the primary motivation, and then once I saw I 
> could do that, I didn't think to look beyond.  Hence, I completely 
> forgot about #anchorWithAction:text:, even though I had used it before.
>
> However, I think even this use should probably be revisited, because 
> the original motivation for having external links cause a method to be 
> invoked was because of the desire to have multiple entry points into 
> an application (i.e., static URL's).  This would yield bookmarkable 
> URL's, plus the ability to email a URL to someone that would enter the 
> application at a known point when they clicked the URL that they were 
> emailed (in such a case, they would not have a preconfigured bookmark, 
> nor would they necessarily have ever entered the application before).
>
> But, I suspect the WARegistry stuff could do the same thing.  I'm just 
> not clear on how to use it that way.  Do you have any pointers or 
> sample code that more fully explains how to use the WARegistry?
>
> Nevin
>

Also, I currently have pluggable footers (for my test site), which can 
be swapped for various different footers.  The footers are individual 
components, and are embedded in the main page(s) via their respective 
#renderContentOn: methods thus:

renderContentOn: html
    | footer |
    footer := { ... code to select an appropriate footer component ... }
    { ... other normal render code goes here ... }
    html render: footer

The footers sometimes have links that I wish to invoke a method of the 
main page component rather than a method of the footer component.  If 
the links were created via the #renderContentOn: method of the footer via:

    html anchorWithAction: [self someMethod] text: 'Some Text'

it would invoke the #someMethod of the footer component rather than the 
main page component that was embedding the footer.

So, I suppose that was another reason for my crazy scheme.

But in all such cases, I have the usual nagging suspicion that the 
overall architecture could be cleaner via another approach.

Nevin




   



More information about the Seaside mailing list