Hi all,

Is it possible to use prototype's AJAX updater function to replace a div
with the output of a tapastry page or component?

I''ve tried the following:

I created a js function which should update the mainContent div
*function* showAJAX(index) {
*new* Ajax.Updater("mainContent", "GetContent.html", {
method : "post",
postBody : "index=" + index,
onSuccess : *function*(resp) {
},
onFailure : ajaxError
});
}

Whether GetContent.html is a valid T5 page or a component, in both cases I
get the following error (in the correct mainContent div, so that part works
:-):
An unexpected application exception has occurred.

  - org.apache.tapestry.ioc.internal.util.TapestryException Component
  org.example.myapp.pages.GetContent does not contain an embedded
  component with id 'html'.

Stack trace

  -
  
org.apache.tapestry.internal.structure.ComponentPageElementImpl.getEmbeddedElement
  (ComponentPageElementImpl.java:831)
  -
  org.apache.tapestry.internal.structure.PageImpl.getComponentElementByNestedId
  (PageImpl.java:83)
  - org.apache.tapestry.internal.services.ActionLinkHandlerImpl.handle(
  ActionLinkHandlerImpl.java:69)
  - ...

Any idea what I'm doing wrong?

Thanks
Erik

Reply via email to