On Sunday 15 January 2006 21:51, John Smith wrote:
> I could change my existing delegate to do more than write the style tags
> (which is what it is currently doing), but that sort of deviates from the
> object-oriented approach. Also, I only need to do the html page redirect on
> some pages, whereas the style tags are written on every page. And I don't
> know if I like changing my Border component to also have page flow logic.

I was only illustrating writing into the header area some attributes.

Everything is driven off parameters into the component.  In this particular 
case I chose to grab the URL for the css file out of my application 
properties file, but there is no reason why you couldn't pass in a redirect 
URL string as a component parameter, which was not output when the value is 
null.  That way, the page which calls the component decides if it wants a 
redirect not your component.
>
> ----Original Message Follows----
> From: Alan Chandler <[EMAIL PROTECTED]>

> 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