• 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: How to create a context on-the-fly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to create a context on-the-fly


  • Subject: Re: How to create a context on-the-fly
  • From: Jean-François Veillette <email@hidden>
  • Date: Tue, 23 Aug 2005 09:34:36 -0400

Look at WOApplication api to create a new context
createContext(...)
and
createContextForRequest(...)

IIRC, there is code samples in WOnder souce base.

- jfv

Le 05-08-23, à 05:07, Daniel Muller a écrit :

Hi Frank,

I will give a try, but as there is no session associated with that kind
of context I will have to find a way to add the languages (currently
the languages array is added to the WORequest object).

Daniel

--- "Ruenagel, Frank" <email@hidden> wrote:

Hi,

have you tried

WOContext context = new WOContext(null);

I use it for pages, which should be written to disc or
converted to pdf via xsl-fo.

HTH,
Frank

-----Original Message-----
From: Daniel Muller [mailto:email@hidden]
Sent: Monday, August 22, 2005 10:15 AM
To: WODevList
Subject: How to create a context on-the-fly


Hi,

I'd like to create a context to generate a response for a component
which can be used to send an e-mail or generate a PDF file.

The below code works fine under development environment but not
when I
deploy the application (OSX 10.3 with WO 5.2.3): generateResponse()
returns an empty string.

Any idea how to create a response on-the-fly for a component.

Regards,
Daniel
--

WORequest request = new WORequest(
                  "GET", "/", "HTTP/1.1",
                  new NSDictionary(
                      new NSArray(languages),
                      WO_LANGUAGE),
                  null, null);

WOContext context = new WOContext(request);

WOComponent page =
WOApplication.application().pageWithName(pageName,
context);

WOResponse response = page.generateResponse();

--------------------------------------

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
_______________________________________________
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


http://www.freeiPods.com/?r=21419063

_______________________________________________
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: 
 >Re: How to create a context on-the-fly (From: Daniel Muller <email@hidden>)

  • Prev by Date: Re: Help with Universal Form...
  • Next by Date: Re: FileMaker, Timestamps, and SQL-92
  • Previous by thread: Re: How to create a context on-the-fly
  • Next by thread: using an image as WOSubmit Button
  • Index(es):
    • Date
    • Thread