Hello I try to render a componant in DojoAjaxHandler.getResponse method
with this kind of code in order to replace client side Html:


protected IResourceStream getResponse()
{

        Component[] components = getMyComponents();
        return render(components);
}

protected IResourceStream render(final Component[] components)
{


        StringBufferResourceStream response = new
StringBufferResourceStream("text/plain");

        if (components != null)
        {

                Response resp = new StringResponse();
                RequestCycle requestCycle = RequestCycle.get();
                Response origResponse = requestCycle.getResponse();
                try
                {
                        requestCycle.setResponse(resp);
                        for (int i=0; i < components.length; i++)
                        {


                                Component component = components[i];
                                boolean renderBodyOnly = 
component.getRenderBodyOnly();
                                try
                                {
                                        component.setRenderBodyOnly(true);

                                        component.renderComponent();
                                }
                                catch (Exception ex)
                                {
                                        resp.write("UPDATE_ERROR");
                                }
                                finally
                                {
                                        
component.setRenderBodyOnly(renderBodyOnly);
                                }

                        }
                }
                finally
                {
                        requestCycle.setResponse(origResponse);
                }
                response.append(resp.toString());
        }

        return response;
}

But my StringBufferResourceStream response is empty (even if
component.renderComponent() is called).
I don't understand why resp is empty, it seems renderComponent() put
nothing in resp

an idea?

thanks


--
Vincent



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wicket-stuff-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-stuff-develop

Reply via email to