[Seaside] Jump somewhere after rendering

Michael Meyer sangria at gmx.net
Tue Jun 7 12:24:59 CEST 2005

Hi Bob
I haven't got my image around at the moment. But I can
give you some hints.

You need to create two methods. One to create a possible
jump destination and one  for the actual jump.

WAHtmlRenderer>>marker: aSymbol
  "Create a possible target. <a name=aSymbol></a>"
  self attributes at: 'name' put: aSymbol.
  self tag: 'a'.

WAHtmlRenderer>>jump: aSymbol
  "Jump to target aSymbol with javascript"
  self script: 'document.location.hash = ', aSymbol.

Now lets assume you have a parent component named
WAParent that contains several child components
named WAChild

The renderContentOn: methods need to look something
like this.

WAParent>>renderContentOn: html
  ... render all children ...
  html jump: aSymbol

WAChild>>renderContentOn: html
  html marker: aSymbol
  ... render the child component ...

There is still some code missing.
Every WAChild component needs to have a unique
identifier for the "html marker: aSymbol" call and
the WAParent component needs to know the jump
destination for the "html jump: aSymbol" call.

Does that help?

> --- Ursprüngliche Nachricht ---
> Von: Bob Houston
> Michael,
> I don't quite understand how this works.  Can you tell me when and  
> >from where you are calling "html jumpHere" ?
> Thanks,
> BobH
> On Jun 6, 2005, at 7:31 AM, Michael Meyer wrote:
> > That was easy enough.
> > Thanks
> >
> > Avi Bryant schrieb:
> >
> >> On 6/3/05, Michael Meyer <sangria at gmx.net> wrote:
> >>
> >>> When i go to the bottom of the multi page and click the
> >>> ++ link the page reloads and I'm at the top of the page
> >>> again.
> >>> It would be really nice if my application would jump back to
> >>> the right component after reloading. Does anybody know if
> >>> that is possible?
> >>>
> >> Well, if you can store the information somewhere about which of the
> >> components you want to jump to, and if you don't mind using some
> >> javascript, then you can try something like this (untested):
> >> WAHtmlRenderer>>jumpHere
> >>    html attributes at: 'name' put: 'jump'.
> >>    html tag: 'a'.
> >>    html script: 'document.location.hash="jump"'.
> >> And then use "html jumpHere" from wherever you like.
> >> Avi

Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl

More information about the Seaside mailing list