Buttons and actions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Buttons and actions

Martin Polák
Hi list,

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.
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].

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

changed method:

ADemoAddressApp>>actionEdit
        self redirectToView: #edit

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'


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

Thanks
Martin
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Buttons and actions

Janko Mivšek
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
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: Buttons and actions

Martin Polák
Hi  Janko,

thanks for fast response.

On 21.7.2011, at 22:49, Janko Mivšek wrote:

> Hi Martin,
>
> Welcome to the list!
>
> 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.

Great, I'm really looking forward to see such this example.

>
>
> Super, just corrected, thanks!
>

You're welcome, I'm pleased I could help.


>
> 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
>

Thanks a lot. Now it's clear to me and everything woks well. I must  
catch the overall 'spirit' of Aida, because I just started to dicover  
it, but I must say, it quite impressed me.

Regards
Martin

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