• 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: Dynamically Generating Templates (Newbie)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamically Generating Templates (Newbie)


  • Subject: Re: Dynamically Generating Templates (Newbie)
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 11 Aug 2004 08:08:05 -0700

See www.wocode.com and/or www.wodev.com for example code.


Chuck


At 01:28 AM 11/08/2004 -0700, Jason McInnes wrote:
>I am struggling a bit with how Webobjects uses
>templates (.html and .wod files).
>
>Specifically, I have a requirement that users need to
>be able to specify the template that will be used for
>a page. That is, say I have a Customer EO and it is
>set on a WOComponent. The user wants to be able to
>create several different templates combining static
>elements with dynamic elements created from attributes
>of the Customer EO. At run time, the user wants to be
>able to select one of the templates to be used by the
>component to generate its content. The goal is to not
>have to create a .html, .wod, and particularly a .java
>file for each template the user comes up with. I want
>one .java file - one component - that I can give a
>template to (and the target Customer EO), and it can
>generate its content based on the template and the
>Customer EO. (The user would enter the customer
>number, select the template, and hit something like
>"generate" and a page would come back that had the
>Customer's information in the format specified by the
>template the user had selected.)
>
>I found in the javadoc for WOComponent the method
>templateWithHTMLString which will accept an html
>string and a declaration string, but I'm at a loss as
>to what I can do with the result. First of all the
>method is static, so I'm not calling it on a class
>that I created with a Customer EO instance variable.
>I've got this template, but how do I give it the
>Customer EO? Alternatively, I was thinking I would set
>it on my component java class, but there is no
>setTemplate(WOElement) that I can see. And without
>being able to give the WOElement the Customer EO, I
>don't see how its appendToResponse method will give me
>what I want.
>
>Does anyone have experience with this area? Any
>guidance would be appreciated!
>
>(As an aside, I also don't understand what I am
>supposed to pass in as the third argument to
>templateWithHTMLString - aLanguageArray.)
>
>Thanks!
>
>Jason
>
>
>=====
>Jason McInnes
>2 Degrees
>Cell: 206.849.3680
>Email: email@hidden
>
>
>
>__________________________________
>Do you Yahoo!?
>Yahoo! Mail - 50x more storage than other providers!
>http://promotions.yahoo.com/new_mail
>_______________________________________________
>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.
>
>

--

Chuck Hill                                 email@hidden
Global Village Consulting Inc.             http://www.global-village.net
_______________________________________________
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.


References: 
 >Dynamically Generating Templates (Newbie) (From: Jason McInnes <email@hidden>)

  • Prev by Date: PostgreSQL Adaptor and Plugin
  • Next by Date: Re: PostgreSQL Adaptor and Plugin
  • Previous by thread: Dynamically Generating Templates (Newbie)
  • Next by thread: CurrentJDK link - Check and Fix Tip
  • Index(es):
    • Date
    • Thread