Re: user-defined header/footer html
Re: user-defined header/footer html
- Subject: Re: user-defined header/footer html
- From: John Gilmore-Baldwin <email@hidden>
- Date: Sat, 10 Sep 2005 17:03:08 -0700
Thanks Sacha. Your point is well taken.
I'm working to build a questionnaire tool. I was going for maximum
flexibility, allowing custom html components for the answers with
custom appendToResponse methods to genereate the HTML. I guess I got
so immersed in that idea, I forgot what I was doing (I guess I went
back to my perl CGI days!)
So, thanks for the injection of common sense. I will write "I am a
WebObjects programmer" on the board 100 times now. :)
John
On Sep 10, 2005, at 4:28 PM, Sacha Mallais wrote:
On Sep 10, 2005, at 2:33 PM, John Gilmore-Baldwin wrote:
I'm building an app where I'd like users to be able to specify
header and footer html code that would get inserted using
appendToResponse.
My only hangup is that I can't figure out how to get said html
within the body tag.
I can generate the beginning html part easy enough, but thought
I'd see if there's a better solution I'm overlooking or ignorant of.
For example, if a user wanted to add a custom image at the top of
their page, they could specify that in the app I'm building. Then
it would go before the database content. Similar for a footer.
Are you sure this is what you want to do? From your description,
it would seem I could simply create a WOString in the header and
footer and bind the user's HTML code to that.
If you _must_ inject HTML into an already generated page, you can
get at it via the contentString() method on the WOResponse param of
appendToResponse, but you are throwing away good design for a bad
one, IMHO, and the Principle of Least Surprise would also seem to
apply.
sacha
--
Sacha Michel Mallais President / Senior Developer
Global Village Consulting Inc. http://www.global-village.net/
PGP Key ID: 7D757B65 AIM: smallais
The bird of paradise alights only upon the hand that does not grasp.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden