DefaultModel wave callback method

12 views
Skip to first unread message

Rajmahendra R

unread,
May 31, 2013, 12:13:08 AM5/31/13
to jrebirth-...@googlegroups.com
Currently in DefaultModel

We are activation the listener to listen for Waves in initialize and we write our own method and call it inside

 @Override
    protected void customShowView()

What you think about having a callback method called

onWave(final Wave wave) // DefaultModel class optional method (not a abstract as such because if user dont want to listen then no need to have this method overritten.)

and inside this user can write there own implementations.


(In future if we have annotations i love to see something like )

@OnWave(listen = {MTWaves.SHOW_PAGE})
public void catchMyWaves (final Wave wave) {...}



Sebastien Bordes

unread,
May 31, 2013, 1:59:12 AM5/31/13
to jrebirth-...@googlegroups.com
If you don't create wave handler method, the wave listened will be handled by the default method processAction(Wave)

I will rename it into processWave(Wave)


The OnWave annotation is a good idea I will implement it tonight.

Thanks

Seb

rajma...@gmail.com

unread,
May 31, 2013, 2:08:03 AM5/31/13
to jrebirth-...@googlegroups.com
Cool

I feel we can still add some more Annatations methods to make it more user friendly we can event bring @OnStart .. so no need to worry about doStart or start . we can give that to user to name the method :)


--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes JRebirth Developers.
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jrebirth-develo...@googlegroups.com.
Pour plus d'options, visitez le site https://groups.google.com/groups/opt_out .
 
 



--
Thank you and regards,
Rajmahendra R Hegde (Raj)
Website:
http://www.twitter.com/rajonjava
http://www.jugchennai.in             
----------------------------------------------------------------------------------------------
"DREAM is not what you see in sleep;
is the thing which does not let you sleep" - APJ Abdul Kalam
Do the difficult things while they are easy and do the great things while they are small.
A journey of a thousand miles must begin with a single step. - Lao Tzu


Sebastien Bordes

unread,
May 31, 2013, 4:32:40 AM5/31/13
to jrebirth-...@googlegroups.com
doStart doesn't exist anymore, it was renamed into start

using an annotation can sometimes be cool, but in this case it will add some useless complexity

If 2 methods are tagged with OnStart annotation which one should be triggered first ? (I assume taht we can add an annotation property to define the order)

I think it's an overkill feature that can disturb users, but I could be added in parallel (user could choose the way he wants)

Seb



Le vendredi 31 mai 2013 08:08:03 UTC+2, Rajmahendra R a écrit :
Cool

I feel we can still add some more Annatations methods to make it more user friendly we can event bring @OnStart .. so no need to worry about doStart or start . we can give that to user to name the method :)
On Fri, May 31, 2013 at 11:29 AM, Sebastien Bordes <sebastie...@gmail.com> wrote:
If you don't create wave handler method, the wave listened will be handled by the default method processAction(Wave)

I will rename it into processWave(Wave)


The OnWave annotation is a good idea I will implement it tonight.

Thanks

Seb

Le vendredi 31 mai 2013 06:13:08 UTC+2, Rajmahendra R a écrit :
Currently in DefaultModel

We are activation the listener to listen for Waves in initialize and we write our own method and call it inside

 @Override
    protected void customShowView()

What you think about having a callback method called

onWave(final Wave wave) // DefaultModel class optional method (not a abstract as such because if user dont want to listen then no need to have this method overritten.)

and inside this user can write there own implementations.


(In future if we have annotations i love to see something like )

@OnWave(listen = {MTWaves.SHOW_PAGE})
public void catchMyWaves (final Wave wave) {...}



--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes JRebirth Developers.
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jrebirth-developers+unsub...@googlegroups.com.

Pour plus d'options, visitez le site https://groups.google.com/groups/opt_out .
 
 

rajma...@gmail.com

unread,
May 31, 2013, 4:46:51 AM5/31/13
to jrebirth-...@googlegroups.com
>user could choose the way he wants
This is cool.

One nice help of Annotations is that it gives freedom to have user own name to methods and system take cares of the real implementation.

Its true it do create useless complexity... lets see in future how people sue based on that we can remove it. But if you feel its to much addition of annotations then we can remove the idea any time.


Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jrebirth-develo...@googlegroups.com.

Pour plus d'options, visitez le site https://groups.google.com/groups/opt_out .
 
 

Sebastien Bordes

unread,
May 31, 2013, 4:54:53 AM5/31/13
to jrebirth-...@googlegroups.com
I will create an issue on GitHub to follow up this idea

Seb
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jrebirth-developers+unsubscribe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages