On Sunday 15 January 2006 06:19, John Smith wrote:
> Is there a clean way to do an html page redirect? I see that on the Shell
> component I can specify a refresh for the page, but I don't see a redirect.
>
> I could write a delegate for the Shell component, but I already have a
> delegate that is writing stuff to the head tag. I suppose I could make my
> existing delegate be able to itself take a delegate and sort of chain them
> together. Or I guess I could write a custom Shell component that takes an
> array of delegates.

I have a border component that I made that is writing an extra stylesheet link 
into the header.  Perhaps you could do something similar?

The shell component call has this
<html jwcid="@Shell" stylesheet="ognl:pageStyle" title="ognl:siteTitle" 
delegate="ognl:siteCSS">

by java class for this component has

        private class siteCSS implements IRender {
                public void render(IMarkupWriter writer, IRequestCycle cycle) {
                        writer.beginEmpty("link");
                        writer.attribute("rel","stylesheet");
                        writer.attribute("type","text/css");
                        writer.attribute("href",appMessage("cssURL"));
                        writer.println();
                }
        }

(appmessage does something like getPage().getMessages().getMessage() )
Why can't you just add the writing sections into your existing delegate?


-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to