You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Alexander Turtsevich <at...@beldts.de> on 2007/11/26 15:42:30 UTC

[T5] 5.0.7 ajax update

hi,

i used this example for tapestry 5.0.6 to update some components:

    public Object onMyAction()
    {
        MarkupWriter markupWriter = _markupWriterFactory.newMarkupWriter();
        markupWriter.element("component");
        _pageRenderInitializer.setup(markupWriter);
        Page page = 
_requestPageCache.get(_componentResources.getPageName());
        ComponentPageElement element = 
page.getRootElement().getEmbeddedElement("componentId");
        RenderQueueImpl queue = new RenderQueueImpl(page.getLogger());
        queue.push(element); 
        queue.run(markupWriter);
        markupWriter.end();
        _pageRenderInitializer.cleanup(markupWriter);
        return new TextStreamResponse("text/html", markupWriter.toString());
    }

but for 5.0.7 this code doesnt work.

How partial page rendering should be done using 5.0.7??

thanks for any help

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


Re: [T5] 5.0.7 ajax update

Posted by Howard Lewis Ship <hl...@gmail.com>.
I'm in the middle of a bunch of Ajax related changes.

See class AjaxComponentActionRequestHandler for an example of how to
do a partial page render.

Obviously, the code in your example is stuff from the .internal.
package, subject to change at any time.

I have an outstanding issue to add some stable, public APIs to
accomplish this kind of thing.

You may find that the new Ajax support will accomplish what you need
easier.  It's still in progress.

On Nov 26, 2007 6:42 AM, Alexander Turtsevich <at...@beldts.de> wrote:
> hi,
>
> i used this example for tapestry 5.0.6 to update some components:
>
>     public Object onMyAction()
>     {
>         MarkupWriter markupWriter = _markupWriterFactory.newMarkupWriter();
>         markupWriter.element("component");
>         _pageRenderInitializer.setup(markupWriter);
>         Page page =
> _requestPageCache.get(_componentResources.getPageName());
>         ComponentPageElement element =
> page.getRootElement().getEmbeddedElement("componentId");
>         RenderQueueImpl queue = new RenderQueueImpl(page.getLogger());
>         queue.push(element);
>         queue.run(markupWriter);
>         markupWriter.end();
>         _pageRenderInitializer.cleanup(markupWriter);
>         return new TextStreamResponse("text/html", markupWriter.toString());
>     }
>
> but for 5.0.7 this code doesnt work.
>
> How partial page rendering should be done using 5.0.7??
>
> thanks for any help
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind

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


Re: [T5] 5.0.7 ajax update

Posted by Michael Courcy <mi...@gmail.com>.
Hi
> i used this example for tapestry 5.0.6 to update some components: 
Where did you read this example ? On the wiki ?

Thanks.


Alexander Turtsevich a écrit :
> hi,
>
> i used this example for tapestry 5.0.6 to update some components:
>
>    public Object onMyAction()
>    {
>        MarkupWriter markupWriter = 
> _markupWriterFactory.newMarkupWriter();
>        markupWriter.element("component");
>        _pageRenderInitializer.setup(markupWriter);
>        Page page = 
> _requestPageCache.get(_componentResources.getPageName());
>        ComponentPageElement element = 
> page.getRootElement().getEmbeddedElement("componentId");
>        RenderQueueImpl queue = new RenderQueueImpl(page.getLogger());
>        queue.push(element);        queue.run(markupWriter);
>        markupWriter.end();
>        _pageRenderInitializer.cleanup(markupWriter);
>        return new TextStreamResponse("text/html", 
> markupWriter.toString());
>    }
>
> but for 5.0.7 this code doesnt work.
>
> How partial page rendering should be done using 5.0.7??
>
> thanks for any help
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Michael Courcy
http://courcy.blogspot.com


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


Re: [T5] 5.0.7 ajax update

Posted by Alexander Turtsevich <at...@beldts.de>.
Michael Courcy wrote:
> Hi
>> i used this example for tapestry 5.0.6 to update some components: 
> Where did you read this example ? On the wiki ?
>
> Thanks.
thats from mail list, you may search here 
http://www.nabble.com/Tapestry-f302.html

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