Thanks a lot for your help :)

On Sat, Sep 1, 2012 at 11:35 PM, Muhammad Gelbana <m.gelb...@gmail.com>wrote:

> I've been debugging the code too and found out that the method
> purgeChildren(element); looks up the element's children through
> element.childNodes which is always undefined. What's confusing me is that
> this case isn't so special and isn't hard to fix, so why is it still there
> ?!
>
>
> On Sat, Sep 1, 2012 at 11:26 PM, Dmitry Gusev <dmitry.gu...@gmail.com>wrote:
>
>> This seems to be bug in tapestry5-jquery.
>>
>> In file t5-dom-jquery.js:
>>
>>             /**
>>              * Removes all children form the element, properly purging
>> child elements
>>              * of any listeners, etc.
>>              * @param element to purge
>>              */
>>             function removeChildren(element) {
>>                 purgeChildren(element);
>>                 element.innerHTML = '';
>>             }
>>
>> should be
>>
>> element.children().remove();
>>
>> instead of:
>>
>> element.innerHTML = '';
>>
>> On Sun, Sep 2, 2012 at 12:04 AM, Muhammad Gelbana <m.gelb...@gmail.com
>> >wrote:
>>
>> > It must be something wrong I'm doing because It's working fine in the
>> same
>> > environment for the tapestry's quickstart application !
>> >
>> > What exactly happens is that after few alerts are generated from
>> different
>> > sources (event link and form submits), if I click "Dismiss all", all
>> alerts
>> > disappear and the ajax request is sent but If I generate another alert
>> > without refreshing the page, all the same old alerts appear again in
>> > addition to the new alert !
>> >
>> > . My alert tag is in my layout component
>> >
>> > > *<t:alerts />
>> > > <t:body />*
>> >
>> >
>> > . The event link is in the *ProbesHealth* page and surrounded by a dummy
>> > zone
>> >
>> > > *<t:zone><t:eventlink t:id="updateSNLink"
>> t:event="UpdateSerialNumbers"
>> > > t:zone="^">Update Serial Numbers</t:eventlink></t:zone>*
>> >
>> >
>> > The form producing alerts too is in the same page and surrounded by a
>> dummy
>> > zone too
>> >
>> > > *<t:zone>
>> > > <t:form class="post_message" t:zone="^">
>> > >  <t:textfield maxlength="128" t:value="probeComment"/>
>> > > <t:submit class="btn_post_message" t:value="Update"
>> t:context="literal:2"
>> > > t:event="UpdateComment"/>
>> > > </t:form>
>> > > </t:zone>*
>> >
>> >
>> >  The *ProbesHealth* page code has the following
>> >
>> > > *@Inject
>> > > private AlertManager alert;
>> > > *
>> >
>> >
>> >
>> > > *@SuppressWarnings("unused")
>> > > @OnEvent(value = "UpdateComment")
>> > > private void updateProbeComment(int probeId) {
>> > > alert.error("Feature not supported yet");
>> > > }
>> > > *
>> >
>> >
>> >
>> > > *private void onUpdateSerialNumbers() {
>> > > alert.info("Probes serial numbers will be collected.");
>> > > }*
>> >
>> >
>> > So I have a few questions:
>> > 1. What am I doing wrong here ?
>> > 2. Is it better to use a dummy zone to have it's id in the form's and
>> > eventlink's zone attribute or to have a zone for each element ? I'm
>> asking
>> > because I will have up to 250 forms in the future.
>> >
>>
>>
>>
>> --
>> Dmitry Gusev
>>
>> AnjLab Team
>> http://anjlab.com
>>
>
>

Reply via email to