[aida] Aida and Ajax

5 views
Skip to first unread message

Hilaire

unread,
Feb 18, 2015, 6:56:48 AM2/18/15
to ai...@aidaweb.si
Hello,

For a total Ajax neophyte, Aida is really generous when it comes to add
practical round-trip information/update between the client and the server.

The code snippet bellow just update a WebElement accordingly the state
of an another form, itself mapped to a server model.

I am still wondering how it is processes underneath but it is really great.

Thanks

Hilaire


viewMain
| html check message |

html := WebElement new.

check := html addCheckboxAspect: #contents for: (value :=
ValueHolder new contents: true).
message := self myMessage.
html addBreak; add: message.
check onChangePostAndUpdate: message.
[...]

myMessage
| html |
html := WebElement newSpan.
html style: ''.
value contents
ifTrue: [ html addText: 'Vrai']
ifFalse: [ html addTextBold: 'Faux'].
^ html


--
Dr. Geo - http://drgeo.eu
iStoa - http://istoa.drgeo.eu


_______________________________________________
Aida mailing list
Ai...@aidaweb.si
http://lists.aidaweb.si/mailman/listinfo/aida
Reply all
Reply to author
Forward
0 new messages