[Seaside] Page Refresh back to same html element

Tom Phoenix rootbeer at redcat.com
Tue Jan 1 15:39:45 UTC 2008

On Jan 1, 2008 3:58 AM, Rajeev Lochan <lochan94 at gmail.com> wrote:

> For example, I have a long list of items and to view the lower items,
> scrollbar is used. I have some anchors/buttons next to each item. When I
> click on anchor or button, page refreshes and shows the default view (top of
> the list). Again I have to scroll down to make other changes.

Although this isn't exactly what you're asking for, I'd consider
displaying the list in a different way. Above the list you have now,
include the "most recent up-to-three" active items on the list. That
is, a few of the list items would be duplicated at the top of the
page, for the user's convenience. This is not unlike a search engine
returning "most popular results" before the entire list of results.
Would that work for you?

If you do want to scroll down to an item when the page reloads, you'll
need an internal HTML name at that point. You could name each possible
point where you might want to scroll to, but it's probably easier just
to use one label:

    html anchor name: 'START_HERE'.

To redirect the browser to that point, your presenter can implement
the #updateUrl: message; see the Seaside documentation page on "The
Render Tree". This works for me:

    updateUrl: url

	super updateUrl: url.
	url fragment: 'START_HERE'

Good luck with it!

--Tom Phoenix

More information about the seaside mailing list