[Seaside] Home Link
zulq at orange.net
Sat Mar 25 03:08:29 UTC 2006
I've been trying to implement a way for any component or task to send
the user to the root page, i.e. home. I'm having some difficulties.
I have added an instance variable 'root' and #root which returns the
current component as the root if #root:aComponent has not already been
sent. This is in the superclasses to all my components and tasks which
extend WAComponent and WATask respectively.
^ root ifNil: [root := self]
root := aComponent
So, before I call any component I pass the current root to the called
self call: (aComponent root: self root)
Assuming all the components I call understand what to do with a root
then at any given time a component will have a reference to the root
component via "self root".
Now, a link home takes a simple form.
html anchorWithAction: [self root home] text: 'Home'
And this seems to work fine. I don't appear to be able to call home from
a Task though.
self root home
# PFView(Object)>>doesNotUnderstand: #owner
self a PFView
decoration a WAStateHolder(a PFView)
root a PFView
I've attached the full stack trace from the call to #renderContentOn of
I'm not sure what I'm doing wrong, any help would be appreciated.
More information about the Seaside