• 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: Programmatically rendering a WOComponent
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically rendering a WOComponent


  • Subject: Re: Programmatically rendering a WOComponent
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 15 Mar 2004 15:58:02 -0800

Hi Arturo!

Seems like a reasonable thing to me. You have to be careful doing this with request.context. The best is to create a new context and
w.awakeInContext();
WOResponse r = w.generateResponse();
Then get the HTML (or whatever) from r.content().


There is not too much of a reason to create a WODynamicElement unless you are optimizing or need special binding access. There is some stuff on WODev about this and, of course, in "the book".

Chuck


On Mar 15, 2004, at 3:44 PM, Arturo Pirez wrote:

I have a desire, perhaps misplaced, to want to create a WOComponent, save it in an instance variable, and then later get it to generate its HTML. I don't want to use WOBuilder to place this component on a page, but I do want it to get rendered "programmatically" at some point.

What's my best strategy to achieve this?

Essentially, I want to
	WOComponent w = pageWithName("AComponent");
     save(w);
	<some time later>
	w.appendToResponse()

In the above, component w does not appear on any page and is a partial component. Is there any way to do this or shall I pursue a different (perhaps more enlightened) strategy?

I have the vague feeling that WODynamicElement might be a good thing to know about for this problem but I haven't seen anything to cement that feeling.

Thanks in advance.
----
WO in philadelphia - wanna cheesesteak with that?
Please visit webobjects.meetup.com.
_______________________________________________
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.
_______________________________________________
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.


  • Follow-Ups:
    • Re: Programmatically rendering a WOComponent
      • From: Arturo Pérez <email@hidden>
References: 
 >Programmatically rendering a WOComponent (From: Arturo Pérez <email@hidden>)

  • Prev by Date: Programmatically rendering a WOComponent
  • Next by Date: Re: Programmatically rendering a WOComponent
  • Previous by thread: Programmatically rendering a WOComponent
  • Next by thread: Re: Programmatically rendering a WOComponent
  • Index(es):
    • Date
    • Thread