Login  Register

Re: Aida 6.4 problem with Ajax HTML5 based application

Posted by Janko Mivšek on Jul 31, 2012; 2:42pm
URL: 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.

Have a nice day
Janko

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
>

--
Janko Mivšek
Svetovalec za informatiko
Eranova d.o.o.
Ljubljana, Slovenija
www.eranova.si
tel:  01 514 22 55
faks: 01 514 22 56
gsm: 031 674 565


_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida