Search in sources :

Example 11 with Zone

use of org.apache.tapestry5.corelib.components.Zone in project tapestry-5 by apache.

the class MultiZoneUpdateDemo method onActionFromUpdate.

Object onActionFromUpdate() {
    wilmaMessage = "His Wife, Wilma.";
    // Do one the new way
    ajaxResponseRenderer.addRender("fred", fredBlock);
    ajaxResponseRenderer.addCallback(new JavaScriptCallback() {

        public void run(JavaScriptSupport javascriptSupport) {
            javascriptSupport.require("app/multi-zone-update").with("message", "Updated");
        }
    });
    return new MultiZoneUpdate("barney", barneyBlock).add("dino", "His dog, Dino.").add(wilmaZone);
}
Also used : JavaScriptSupport(org.apache.tapestry5.services.javascript.JavaScriptSupport) MultiZoneUpdate(org.apache.tapestry5.ajax.MultiZoneUpdate) JavaScriptCallback(org.apache.tapestry5.services.ajax.JavaScriptCallback)

Aggregations

Link (org.apache.tapestry5.http.Link)6 ComponentActionSink (org.apache.tapestry5.corelib.internal.ComponentActionSink)2 Element (org.apache.tapestry5.dom.Element)2 JSONObject (org.apache.tapestry5.json.JSONObject)2 RenderCommand (org.apache.tapestry5.runtime.RenderCommand)2 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 MarkupWriter (org.apache.tapestry5.MarkupWriter)1 MultiZoneUpdate (org.apache.tapestry5.ajax.MultiZoneUpdate)1 AfterRender (org.apache.tapestry5.annotations.AfterRender)1 BeginRender (org.apache.tapestry5.annotations.BeginRender)1 FormSupportAdapter (org.apache.tapestry5.corelib.internal.FormSupportAdapter)1 HiddenFieldPositioner (org.apache.tapestry5.corelib.internal.HiddenFieldPositioner)1 BeanValidationContextImpl (org.apache.tapestry5.internal.BeanValidationContextImpl)1 PageRenderQueue (org.apache.tapestry5.internal.services.PageRenderQueue)1 AutofocusValidationDecorator (org.apache.tapestry5.internal.util.AutofocusValidationDecorator)1 IdAllocator (org.apache.tapestry5.ioc.util.IdAllocator)1 JSONArray (org.apache.tapestry5.json.JSONArray)1 RenderQueue (org.apache.tapestry5.runtime.RenderQueue)1 Heartbeat (org.apache.tapestry5.services.Heartbeat)1 JavaScriptCallback (org.apache.tapestry5.services.ajax.JavaScriptCallback)1