You could also go and reinvent the wheel. But if you were smart and using T4 you'd just add async="true" to your form component and you are set. If you also want to reload the comments on your page without reloading the whole page wrap them in an Any component and pass its id to the updateComponents parameter of your form. See http://tapestry.apache.org/tapestry4.1/components/form/form.html for details.

Uli

Loïc Talbot schrieb:
Hi,

is there a way to change only components and not reload the hole page? In
example i have an activex component on the page (an image viewer). I can
control the image viewer with java script ( goToNextPosition() and so on).
For every position the user should be able to make some comments with some
forms. So if the user press the send button for the forms the activex
component should not reload (because it takes a while to load it). Is
there
a way to do this with tapestry, or with tapestry + ajax?

Best regards,


Hi Sabine,
If you are trying to get only some elements of a page through an ajax
request, assuming you are using T4, you could implement a class that
inherits from AbstractComponent and overrides renderComponent() method.
    @Override
    protected void renderComponent(IMarkupWriter writer, IRequestCycle
cycle) {
        StringBuffer s = new StringBuffer();
        writer.begin("script");
        writer.attribute("type", "text/text");
        s.append("the elements for your next forms");
        writer.printRaw(new String(s));
        writer.end();
    }
this component could  then be accessed directly if it also implements
IDirect or through a BasePage.
Your javascript should be responsible for calling this component and then
replacing the right elements of the page with the returned elements of this
Tapestry component.

Loïc


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

Reply via email to