Re: File referencing in WO Components
Re: File referencing in WO Components
- Subject: Re: File referencing in WO Components
- From: Art Isbell <email@hidden>
- Date: Sun, 22 Jun 2003 17:46:06 -1000
On Sunday, June 22, 2003, at 02:16 PM, Sonali Batish wrote:
My web page will display both static components (client logo etc) and
dynamic content. This dynamic content will typically be an HTML file,
located on the Web Server, with a reference to it (the file path)
stored in
a table as part of the customer profile.
I tried to look around on the list archives to see how this can be done
but to no avail. If someone can please show me how I can bind my
database filepath variable to a dynamic WOElement to generate content.
I'm not aware of a dynamic element that has a key bound to a file path
such that the file contents is displayed by the element. But you could
write a pretty simple reusable component that would do this. It would
have a WOString whose "value" key is bound to a method that returns a
string. The WOString's "escapeHTML" key would be bound to "false" so
that the browser would interpret all HTML tags in the value string.
This method would use EOF to get the file's path from the database and
use standard Java API to read the file and return its contents as a
string.
Aloha,
Art
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.