https://forum.world.st/Aida-6-4-problem-with-Ajax-HTML5-based-application-tp4641846p4642273.html
Nice to hear that. In any case this mounting of onAnswerDo: calls needs
to be rethought and find a way how to avoid it.
Dne 31. 07. 2012 16:36, piše Martin Polák:
> Hi Janko,
>
> thanks for your reply, it helped :). But I must place #initEventHandlers in onPopupDo: block, because in #build method it clears the last block (which is needed) too. So my code looks like:
>
> (e addNilLinkText: 'Add') onClickDo: [self expenseWidget isNew: true; initEventHandlers; onAnswerDo: [:newExpense | self observee addExpense: newExpense. anElement update]];
>
> everything looks now OK.
>
> Martin
>
>
> 31. 7. 2012 v 14:12, Janko Mivšek <
[hidden email]>:
>
>> Hi Martin,
>>
>> This is my first guess: try to init widget event handlers at the start
>> of widget build method:
>>
>> aWidget>>#build
>> self initEventHandlers
>> ....
>>
>> But maybe even better would be to put #initEventHandlers in #clear
>> method, I suppose. #Clear is then called from Ajax called #rebuild, but
>> you can call it manually as well. Would you experiment a bit with that idea?
>>
>> Best regards
>> Janko
>>
>>
>
> _______________________________________________
> Aida mailing list
>
[hidden email]
>
http://lists.aidaweb.si/mailman/listinfo/aida>
Eranova d.o.o.