[Seaside] Using 'anchor' to point to an already loaded component
philippe.marschall at gmail.com
Wed Jun 26 16:25:22 UTC 2013
On Tue, Jun 25, 2013 at 5:05 PM, Bahman Movaqar <Bahman at bahmanm.com> wrote:
> Hi all,
> Let's say I have a header on the website with a link "Home". Now,
> obviously, I want this "Home" to point to the root of the application.
> How can I do this?
> Doing the following, certainly -as I've already tried it- will cause an
> infinite recursion :-)
> h anchor
> callback: [ self parent content: self parent ];
> with: 'Home'.
There is no generic way to do this. Normally your application is
divided into at least three components. A root component with contains
a menu component and a "content component". The menu component
"somehow" sets the "content component" (sometimes the menu is also
rendered by the root component)
Somehow the component containing the component that should change
needs to be notified.
If you have access to the root component you can also try this:
rootComponent call: rootComponent class new
But before you write code like this:
self parent parent parent parent content: Home new
Have a look at announcements 
More information about the seaside