[aida] Buttons and actions

Janko Mivšek janko.mivsek at eranova.si
Thu Jul 21 22:49:53 CEST 2011


Hi Martin,

Welcome to the list!

S, Martin Polák piše:

> although I have experience with Seaside and made couple of application  
> with it, I'm completely beginner in Aida world. I must say, that  
> Aida's concept looks pretty interesting and for dozens of webapps is  
> much more suitable than Seaside.

I'm just preparing a ToDo example to show the another and currently the
strongest dimension: highly ajaxified and realtime so called single page
apps. What you saw in tutorial is a traditional but still very needed
approach. Combined with single page one you come to the biggest strength
of Aida.

> Ok, back to my question. I have followed tutorial on http://www.aidaweb.si/tutorial 
>   and everything works fine...Oh maybe in last section (7. Enhance the  
> table) is IMO small typo in:
> 
> column: 3 addBlock: [ :each |
> 			(WebElement new) addLinkTo: each text: each surname].
> 
> should be:
> 
> column: 3 addBlock: [ :each |
> 			(WebElement new) addLinkTo: each text: each lastName].

Super, just corrected, thanks!

> After completed tutorial, I tried to improve some details by myself  
> and here I went into troubles. I want button 'Back' in the view of  
> address in class ADemoAddressApp alongside the implicit button 'Edit'.  
> So I added method:
> 
> ADemoAddressApp>>actionBack
> 	self redirectTo: self observee parent

Change method name to #actionMainBack

> 
> changed method:
> 
> ADemoAddressApp>>actionEdit
> 	self redirectToView: #edit

And change this method name to #actionMainEdit.
> 
> and made changes in:
> 
> ADemoAddressApp>>viewMain
> 
> 	...here goes original code from tutorial...
> 	...
> 	e addButtonText: 'Edit' action: #edit.
> 	e addButtonText: 'Zpět' action: #back.
> 	self style pageFrameWith: e title: 'Address'

As you see action method names are composed by convetion as
'action'+viewname+action(optional). That's why #actionMainBack.

Let me add an error report if such method is not composed correctly and
therefore missing...

Best regards
Janko


> After this "improvements", nothing is happen no matter if I click on  
> Edit or Back. What I'm doing wrong, please?
> 
> Thanks
> Martin


-- 
Janko Mivšek
Aida/Web
Smalltalk Web Application Server
http://www.aidaweb.si


More information about the Aida mailing list