You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stephane Decleire <sd...@cariboo-networks.com> on 2007/05/07 13:41:06 UTC

How to store the rendering of a page in a String

Hi,

I'd like to store the rendering of a page in a String instead of sending 
it back to the client.
Has anybody already implemented such a task ?
Any idea is welcome :-)

Thanks

--
Stéphane Decleire
www.bebe-nounou.com


Re: How to store the rendering of a page in a String

Posted by Martino Piccinato <ma...@gmail.com>.
can't one just pass it's own IMarkupWriter that would just write to a
different OutputStream?

Re: How to store the rendering of a page in a String

Posted by Jesse Kuhnert <jk...@gmail.com>.
You have to contribute a new ResponseContributor to the service point here:

http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/config/tapestry.services.ResponseContributors.html

It works the same way as the tacos version. Different response types sniff
the incoming http request and one of them wins in responding to it.

On 5/9/07, Stephane Decleire <sd...@cariboo-networks.com> wrote:
>
> Thanks Jesse,
>
> I think i can manage the alterations in the ResponseBuilder but i would
> welcome some advice on the way to inject the custom ResponseBuilder in
> the rendering cycle.
>
> --
> Stéphane Decleire
> www.bebe-nounou.com
>
>
>
> Jesse Kuhnert a écrit :
> > It's a little more complicated looking than saying it just "stores a
> > string"
> > but you could easily cut && paste (or extend - but carefully as this
> > impl is
> > a moving target....)
> >
> >
> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/DojoAjaxResponseBuilder.java?view=markup
> >
> >
> > or even
> >
> >
> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/JSONResponseBuilder.java?view=markup
> >
> >
> > On 5/7/07, Stephane Decleire <sd...@cariboo-networks.com> wrote:
> >>
> >> Hi,
> >>
> >> I'd like to store the rendering of a page in a String instead of
> sending
> >> it back to the client.
> >> Has anybody already implemented such a task ?
> >> Any idea is welcome :-)
> >>
> >> Thanks
> >>
> >> --
> >> Stéphane Decleire
> >> www.bebe-nounou.com
> >>
> >>
> >
> >
>



-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

Re: How to store the rendering of a page in a String

Posted by Stephane Decleire <sd...@cariboo-networks.com>.
Thanks Jesse,

I think i can manage the alterations in the ResponseBuilder but i would 
welcome some advice on the way to inject the custom ResponseBuilder in 
the rendering cycle.

--
Stéphane Decleire
www.bebe-nounou.com



Jesse Kuhnert a écrit :
> It's a little more complicated looking than saying it just "stores a 
> string"
> but you could easily cut && paste (or extend - but carefully as this 
> impl is
> a moving target....)
>
> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/DojoAjaxResponseBuilder.java?view=markup 
>
>
> or even
>
> http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/JSONResponseBuilder.java?view=markup 
>
>
> On 5/7/07, Stephane Decleire <sd...@cariboo-networks.com> wrote:
>>
>> Hi,
>>
>> I'd like to store the rendering of a page in a String instead of sending
>> it back to the client.
>> Has anybody already implemented such a task ?
>> Any idea is welcome :-)
>>
>> Thanks
>>
>> -- 
>> Stéphane Decleire
>> www.bebe-nounou.com
>>
>>
>
>

Re: How to store the rendering of a page in a String

Posted by Jesse Kuhnert <jk...@gmail.com>.
It's a little more complicated looking than saying it just "stores a string"
but you could easily cut && paste (or extend - but carefully as this impl is
a moving target....)

http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/DojoAjaxResponseBuilder.java?view=markup

or even

http://svn.apache.org/viewvc/tapestry/tapestry4/trunk/tapestry-framework/src/java/org/apache/tapestry/services/impl/JSONResponseBuilder.java?view=markup

On 5/7/07, Stephane Decleire <sd...@cariboo-networks.com> wrote:
>
> Hi,
>
> I'd like to store the rendering of a page in a String instead of sending
> it back to the client.
> Has anybody already implemented such a task ?
> Any idea is welcome :-)
>
> Thanks
>
> --
> Stéphane Decleire
> www.bebe-nounou.com
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com