[aida] Ajax using WebElements: how does Aida find and rerun the code?

Stephen Davies stephen.l.davies at gmail.com
Tue Sep 16 21:15:09 CEST 2008

I did this:

| e time |
e := WebElement new.
time := self timeField.
time updateEverySeconds: 1.
e add: time; addBreak.

| e |
e := WebElement new.
e style: ''.
e addTextBold: Date today printString, ' ', Time now printString.
^ e

So this works perfectly - my time dutifully updates.

But for the life of me I cannot figure out how Aida knows to call the
timeField method in order to get the new time.
I see that the generated web page marks the field with a div id:

<div style="" id="id94">
    <b>16 September 2008 9:02:57 pm</b>
<script type="text/javascript">; new Ajax.PeriodicalUpdater('id94',
'/addressbook.html', {method: 'post', postBody:
'view=main&ajaxRequest&ajaxGetElementId=id94', evalScripts: true,
frequency: 1});</script>

So Aida gets the post saying element id id94 must be updated.  But how
does Aida get from that to a call to my #timeField method?

Can someone enlighten me?


PS: Hope you don't mind a bunch of questions like this from a newbie.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.aidaweb.si/pipermail/aida/attachments/20080916/32428bbb/attachment.htm 

More information about the Aida mailing list