Re: Including static HTML in a WOComponent
Re: Including static HTML in a WOComponent
- Subject: Re: Including static HTML in a WOComponent
- From: Mark Morris <email@hidden>
- Date: Sat, 7 May 2005 05:26:08 -0500
Depending on your layout, it could be as simple reading them into a
String somehow (file IO or from a db, with the db being prefered), then
just using a WOString in the appropriate spot on your page with
escapeHTML set to false.
-- Mark
On May 6, 2005, at 11:56 PM, Nathan Hampton wrote:
(I've seen some earlier discussions on this subject, but they all
ended up with turning the static HTML into a WOComponent -- exactly
what I'm trying to avoid.)
I'm working on a web ordering system that uses a legacy database, and
I want to make adding a new product to the catalog as painless as
possible. Most of the product info will be entered using into the
database using a legacy system, but I need a way to add the product
description -- a few paragraphs of static HTML -- and image to the
WOComponent that displays products.
My strategy on the images is to keep them in a directory on the web
server and reference them from the component as <img
src="http://www.domain.com/resources/[itemNumber].jpg">. To keep
things simple, I'd like to do the same thing with the product
descriptions. I don't want to use a WOFrame, and SSI doesn't work
without major hacks, so I'm at a bit of a loss. The only thing I
could think of is to create a subcomponent that generated its response
from an InputStream, but after looking at the java.io API, I'm
completely baffled about how to get an InputStream for a text file.
Is there something I'm missing, or is this really this complicated?
Any help would be appreciated.
--NCH
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
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