Hi Jesse,

i just want do call the Dojo DojoAjaxResponseBuilder to return a "OK"
string. But i dont know how to do this from within my component. Anytime i
obtain the ResponseBuilder from the cycle and call renderResponse i get
a exception. i know i'm missing something but i didn't figure out what....
:)

My component looks sth like this

component:
public abstract class AsyncListenerCaller extends AbstractComponent
implements IDirect {
@InjectScript("AsyncListenerCaller.script")
public abstract IScript getScript();

@InjectObject("infrastructure:listenerInvoker")
public abstract ListenerInvoker getListenerInvoker();

@InjectObject("service:tapestry.services.Direct")
public abstract IEngineService getEngine();

protected void renderComponent(IMarkupWriter writer, IRequestCycle cycle) {
   renderBody(writer, cycle);
   HashMap<String,Object> scriptParameters = new HashMap<String,Object>(2);
   scriptParameters.put("href",getLink(cycle).getURL());
   scriptParameters.put("jsFunctionSuffix", getJsFunctionSuffix());
   // for rendering scripts
   PageRenderSupport pageRenderSupport =
TapestryUtils.getPageRenderSupport(cycle, this);
   // render script
   getScript().execute(this, cycle, pageRenderSupport, scriptParameters);
}
public ILink getLink(IRequestCycle cycle) {       // creates a ILink
   DirectServiceParameter dsp = new DirectServiceParameter(this, new
Object[] {});
   return getEngine().getLink(false, dsp);
}
public void trigger(IRequestCycle cycle) {
    getListenerInvoker().invokeListener(getListener(), this, cycle);
}

script:
<unique>
   dojo.require("tapestry.event");
</unique>
function asyncListener${jsFunctionSuffix}(data) {
   tapestry.bind("${href}", data, false);
}

g,
kris




                                                                           
             "Jesse Kuhnert"                                               
             <[EMAIL PROTECTED]                                             
             om>                                                        An 
                                        "Tapestry users"                   
             06.03.2007 06:23           <users@tapestry.apache.org>        
                                                                     Kopie 
                                                                           
              Bitte antworten                                        Thema 
                    an                  Re: T4: render empty Ajax response 
             "Tapestry users"                                              
             <[EMAIL PROTECTED]                                             
                pache.org>                                                 
                                                                           
                                                                           
                                                                           




Don't specify which components to update? Or make it a json render and
return some meta protocol between your client and server?

On 3/1/07, Kristian Marinkovic <[EMAIL PROTECTED]> wrote:
>
> hi,
>
> how do i render an empty ajax response?
>
> i'm sending an ajax request to synchronize
> the model with the view but i do not need
> any information back except an acknowledgement
> that my request was received and processed.
>
> g,
> kris
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Jesse Kuhnert
Tapestry/Dojo team member/developer

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to