Isn't this the same problem I ran into some weeks ago? Forms not supported
in zones?

Seems to be a lot of people not getting this.

regards
Inge

On Fri, Nov 7, 2008 at 3:47 AM, Marcel Sammut <[EMAIL PROTECTED]> wrote:

>
> Greetings,
> I have a component which displays a header and body contents, where the
> contents are collapsed via AJAX support.  The component is a DIV which
> wraps
> a table that contains the header, AJAX block and Zone.  There is an
> ActionLink which is used to invoke the AJAX method that returns the AJAX
> block to be rendered in the Zone via a delegate component.  The basic AJAX
> concept was derived from the following example:
> http://202.177.217.122:8080/jumpstart/examples/javascript/ajax
>
> Everything is ok and the contents are not rendered when the AJAX ActionLink
> is invoked.  That is done by returning null from the event handler.  The
> problem occurs when the event handler returns the AJAX block to be rendered
> again (i.e.: expand the contents).  Note, that the component itself is
> wrapped within a form on the page.  I recieve the following error after the
> AJAX method exists and returns a valid Block component:
>
> No object of type org.apache.tapestry5.services.FormSupport is available
> from the Environment.  Available types are
> org.apache.tapestry5.RenderSupport,
> org.apache.tapestry5.ValidationDecorator,
> org.apache.tapestry5.internal.services.ClientBehaviorSupport,
> org.apache.tapestry5.services.Heartbeat.
>
> Here is my template:
> <div xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>        <table>
>                <tr>
>                        <td> <t:actionlink t:id="updateState"
> t:zone="ajaxZoneId"> ${stateImage}
> </img></t:actionlink>  </td>
>                </tr>
>                <tr>
>                        <td>
>                                <t:block t:id="ajaxBody">
>                                        <t:body></t:body>
>                                </t:block>
>                                <t:zone t:id="ajaxZoneId">
>                                        <t:delegate
> to="ajaxBody"></t:delegate>
>                                </t:zone>
>                        </td>
>                </tr>
>        </table>
> </div>
>
> Java:
> public class Header {
>        @Parameter(required=false)
>        private boolean collapsed=false;
>
>        @Inject
>        @Property
>        private Block ajaxBody;
>
>        @Inject
>        @Property
>        private Request request;
>
>        @Persist
>        private boolean isCollopsed = collapsed;
>
>        Object onActionFromUpdateState() {
>                if (!request.isXHR()) return null;
>
>                Object body = null;
>
>                if (isCollopsed)
>                        return ajaxBody;
>
>                isCollopsed = !isCollopsed;
>                collapsed = isCollopsed;
>
>                return body;
>        }
>
> }
>
> --
> View this message in context:
> http://www.nabble.com/-T5--Ajax-And-Zones-tp20373776p20373776.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to