Login  Register

Re: Aida 6.4 problem with Ajax HTML5 based application

Posted by Martin Polák on Jul 31, 2012; 2:36pm
URL: https://forum.world.st/Aida-6-4-problem-with-Ajax-HTML5-based-application-tp4641846p4642272.html

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