You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alan Gustin <ag...@insiteobjects.com> on 2000/07/20 22:38:47 UTC

Splitting a request into multiple outputs

Hi, I am a newcomer to the list.
I looked thru the archives but could not find an answer to my question.

I want a producer to not only to provide the content for the page returned
to the user,
but conditionally, based upon the action taken by the user on the page
submitted, I want
the producer to include information to email to multiple addresses.

What I am trying to do is have my producer take the one document, and split
it into many and have the engine
process each one of them, and, based upon PI's from the producer, output
them in different ways.

At the present, the engine only sends back http response.   I was
considering modifying the code to allow the producer to return more
than one document fragment and how each one was to be output.

I suspect that I am approaching this all wrong and that someone can give me
an approach to this without modifying the code.






Re: Splitting a request into multiple outputs

Posted by Mike Engelhart <me...@earthtrip.com>.
on 7/20/00 3:38 PM, Alan Gustin at agustin@insiteobjects.com wrote:

> Hi, I am a newcomer to the list.
> I looked thru the archives but could not find an answer to my question.
> 
> I want a producer to not only to provide the content for the page returned
> to the user,
> but conditionally, based upon the action taken by the user on the page
> submitted, I want
> the producer to include information to email to multiple addresses.
> 
> What I am trying to do is have my producer take the one document, and split
> it into many and have the engine
> process each one of them, and, based upon PI's from the producer, output
> them in different ways.
> 
> At the present, the engine only sends back http response.   I was
> considering modifying the code to allow the producer to return more
> than one document fragment and how each one was to be output.
> 
> I suspect that I am approaching this all wrong and that someone can give me
> an approach to this without modifying the code.
I'm not really sure what you're trying to do but could you just write a
class that has a method that takes a DocumentFragment and email address list
and use the JavaMail API to send it out?
If so then just create an XSP that sends the standard XSL transformation to
the browser and then either spawn a thread and have it send out the email or
just send it from the XSP page itself.

I apologize if this is not what you're trying to accomplish.

mike


RE: Splitting a request into multiple outputs

Posted by Michael Quattlebaum <mi...@mindspring.com>.
If you want to take multiple actions on a particular "event" in the
producer, you might also want to consider using JMS to process the
additional actions.  For example, the producer creates the XML document that
you've defined, then publishes the document to a queue as well as returning
the results to the HTTP client.  Then, a specified parser would be
subscribed to the queue to take any additional actions required for that
document.

Michael Quattlebaum
michaeleq@mindspring.com

-----Original Message-----
From: Alan Gustin [mailto:agustin@insiteobjects.com]
Sent: Thursday, July 20, 2000 4:39 PM
To: cocoon-users@xml.apache.org
Subject: Splitting a request into multiple outputs


Hi, I am a newcomer to the list.
I looked thru the archives but could not find an answer to my question.

I want a producer to not only to provide the content for the page returned
to the user,
but conditionally, based upon the action taken by the user on the page
submitted, I want
the producer to include information to email to multiple addresses.

What I am trying to do is have my producer take the one document, and split
it into many and have the engine
process each one of them, and, based upon PI's from the producer, output
them in different ways.

At the present, the engine only sends back http response.   I was
considering modifying the code to allow the producer to return more
than one document fragment and how each one was to be output.

I suspect that I am approaching this all wrong and that someone can give me
an approach to this without modifying the code.






---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org