• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Including static HTML in a WOComponent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Including static HTML in a WOComponent


  • Subject: Re: Including static HTML in a WOComponent
  • From: Karl <email@hidden>
  • Date: Sat, 7 May 2005 06:30:19 -0400

I would avoid messing about with the fileIO in WO. Either grab the description HTML from a database (any database - it doesn't have to be your legacy one. OpenBase or MySQL would do nicely thank you) or use an IFRAME (which any browser developed in the last 8 years supports). The images can be on the filesystem and just referenced in the usual HTML way.

Karl

On 7-May-05, at 6:26 AM, Mark Morris wrote:

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:
40onpointsoftware.com


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:
40mac.com


This email sent to email@hidden


Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

References: 
 >Including static HTML in a WOComponent (From: Nathan Hampton <email@hidden>)
 >Re: Including static HTML in a WOComponent (From: Mark Morris <email@hidden>)

  • Prev by Date: Re: Including static HTML in a WOComponent
  • Next by Date: moving project folder
  • Previous by thread: Re: Including static HTML in a WOComponent
  • Next by thread: moving project folder
  • Index(es):
    • Date
    • Thread