On Jul 16, 2007, at 11:05 AM, John Huss wrote:

I have a page set up to automatically refresh using this tag:

<meta http-equiv="refresh" content="10">

That is going to mimic click on the link that brought you to this page over and over and over.

But after a few refreshes I get the "You have backtracked too far" error.

Yes, I would expect that to happen.


I can get around it by returning a new instance of the page instead of
null, but it there a better way?  Is this bad design?

I have no idea why that works.  Where / how are you returning null?



I'd make a component to drop in the HEAD, here is quick sketch:



---
                <webobject name="RefreshTag"/>
        </head>
        ...
---
RefreshTag: WOString {
    value = refreshTag;
    escapeHTML = false;
}
---
    /**
* Returns a refresh meta tag to refresh this page in the number of seconds indicated by the metaRefresh * or null if that is not bound. The refresh references a non- existant action method so that no side effects
     * occur as a result of the page being refreshed.
     *
* @return refresh meta tag to refresh this page or null if refreshing is not desired
     */
    public String refreshTag()
    {
        Object metaRefresh = valueForBinding(Meta_Refresh);

        if (metaRefresh != null)
        {
return "<meta http-equiv=\"refresh\" content=\"" + metaRefresh + ";" + context().componentActionURL() + "\">";
        }

        return null;
    }
---


Chuck


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to