• 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: Progress bars and HTML generation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Progress bars and HTML generation


  • Subject: Re: Progress bars and HTML generation
  • From: Lachlan Deck <email@hidden>
  • Date: Fri, 4 Jan 2008 15:04:02 +1100

Hi there,

On 06/12/2007, at 9:55 AM, Paul Hertz wrote:

I have relied on WOLongResponsePage for situations where I have time-consuming calculations or database processes whose progress I can track.

I'm now dealing with a page that reports on data from surveys, some of which can be very long. Obtaining the raw data doesn't seem to be a problem--that can even just be scooped up from the database and filtered in memory to get the answer data for each item on the survey.

The delay in creating the page seems to come in actually generating the HTML, primarily because it constructs tables of data and charts.

WOLongResponse doesn't seem to be quite the right tool for this situation. The building of the template isn't something I can do within performTask, AFAIK.

I don't see why not. Something along the lines of.... Create yourself a clone of the current WOContext and create a request object within that context via application(). Using that response, call generateResponse on whichever pageWithName(...) you like. Then in your response page for the Long response, pass it this WOResponse and have it simply appendToResponse the content of that response.


For one thing, the template gets filled in after appendToResponse completes, which waits for performTask to complete. I suppose that I could use performTask to fetch the data and then construct tables as HTML (rather than relying on the html/wod files and accessor calls), similariy construct any graphics, and pre-cache all that and then just load it into the template. Seems a little primitive, though, to build HTML as strings.

But I can't help but wonder if there isn't a strategy to request a page generated from a component, put up a progress bar while it's generating, and then just hand it off to the server when it's ready.

See above.

with regards,
--

Lachlan Deck



_______________________________________________
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


  • Follow-Ups:
    • Re: Any tutorials on using direct actions and/or component actions with AJAX
      • From: Jake MacMullin <email@hidden>
  • Prev by Date: RE: How to create lproj in Eclipse/WOLips for HelloWorld
  • Next by Date: Re: Any tutorials on using direct actions and/or component actions with AJAX
  • Previous by thread: Re: Progress bars and HTML generation
  • Next by thread: Re: Any tutorials on using direct actions and/or component actions with AJAX
  • Index(es):
    • Date
    • Thread