I keep on trying a way to get this working.

In a previous discussion (see the end of Christian's answer
here<http://markmail.org/thread/w6s3jtmwwfw6vfnx#query:+page:1+mid:jbwboaocfw4lkjqj+state:results>),
a workaround for the null id could be the use of a HeartBeat to defer the
evaluation of the client id value.

had someone already given it a go?

2012/10/22 Thomas Cucchietti <thomas.cucchie...@gmail.com>

> I tried to manually link the zone to the form, but with no success.
>
>     @BeginRender
>     void fixZoneAjaxSupport() {
>         Link link = resources.createEventLink("manualLinkToZone", null);
>         clientBehaviorSupport.linkZone("manageForm", "zoneToRefresh",
> link);
>     }
>
>
> The "linkzone" in Tapestry.init() is updated and contains :
>
>     {
>     "linkId" : "manageForm",
>     "url" : "/my/url/to/page:manualLinkToZone",
>     "zoneId" : "zoneToRefresh"
>     }
>
> However, as the manageForm has random generated number added to its client
> id, it won't be taken into account...
>
> Even if I inject the manageForm into my page, as it isn't initially
> present in the page but only after a first zone update, it's null and I
> have no way to know the exact client id of my form.
>
> After some additional search (thanks markmail!), it seems that this
> clientId will always be uniquefied as the form is contained in the zone.
>
> Anybody has a clue on my first mail? or at least on the workaround I'm
> trying to find?
>
> Thomas
>
>
> 2012/10/22 Thomas Cucchietti <thomas.cucchie...@gmail.com>
>
>> Hello,
>>
>> Is the following behavior intended, as it may be a bug ?
>>
>> With this structure :
>>
>> <t:zone t:id="zoneToRefresh" id="zoneToRefresh">
>>    <t:delegate to="activeBlock"/>
>> </t:zone>
>>
>> <t:block t:id="empty">
>>    <!-- empty block -->
>> </t:block>
>>
>> <t:block t:id="manageBlock">
>>    <t:form t:id="manageForm" zone="zoneToRefresh">
>>             <t:radiogroup t:value="manage">
>>                 <input type="radio" t:type="radio" t:value="true"/>
>>                 Yes
>>                 <input type="radio" t:type="radio" t:value="false"/>
>>                 No
>>             </t:radiogroup>
>>
>>             <t:submit value="Submit form"/>
>>    </t:form>
>> </t:block>
>>
>> (I don't have included the button that refresh the zone the first time)
>>
>> The method getActiveBlock() return the emptyBlock when the page initially
>> loads, then it returns the manageBlock once the refresh button is hit.
>>
>> The problem is that the form contained in the manageBlock doesn't refresh
>> the zone in Ajax, and reload the whole page instead.
>>
>> From what I've searched, it seems that, when the manage block is
>> rendered, the "zone" parameter of the manageForm is null (see line 356 of
>> Form.class, in beginRender method) whereas it should be valued with the
>> zoneToRefresh.
>>
>> I have already encoutered similar errors : the forms and actionlinks that
>> should fire ajax reloads, fire page reload instead when they have not been
>> rendered at the initial page loading.
>>
>> Regards,
>> Thomas
>>
>
>

Reply via email to