You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk> on 2008/09/26 23:37:15 UTC

The Wicket Reflex Game Post thoughts?

Hi Guys

One of the major problems with the game are that if you click a 
box(AjaxEventBehavior) while the heartbeat(AbstractAjaxTimerBehavior) 
are in process you will get an error, since the box's component has 
changed and no longer carries that behavior. I've tried to solve this by 
adding a transparent veil to the page once the heartbeat processes, it's 
simply not good enough, it's still possible to get errors. So how do I 
solve this?

I have one idea but im not liking it, all box's could have behaviors 
even if you wont get an score, that way we will not get an error.


This is a potential pitfall if you ever will have two Ajax components 
that can remove the ones behavior, if the user clicks the other while 
loading then it's gonna complain. On the other hand im not sure what 
wicket can do besides throw a runtime exception.

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: The Wicket Reflex Game Post thoughts?

Posted by Timo Rantalaiho <Ti...@ri.fi>.
On Fri, 26 Sep 2008, Nino Saturnino Martinez Vazquez Wael wrote:
> This is a potential pitfall if you ever will have two Ajax components 
> that can remove the ones behavior, if the user clicks the other while 
> loading then it's gonna complain. On the other hand im not sure what 
> wicket can do besides throw a runtime exception.

Actually this happens also in all cases where the components 
are being replaced, such as doing a continuous ajax search 
with a DataView. I don't know any better way than veiling 
things that will be replaced; it would be interesting to see
if this can be replaced in the new Ajax implementation of 1.5.

Best wishes,
Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: The Wicket Reflex Game Post thoughts?

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
I think it's already been taken care of.. IT's because the user clicks 
on something that no longer exists..

Adriano dos Santos Fernandes wrote:
> Nino Saturnino Martinez Vazquez Wael wrote:
>> Hi Guys
>>
>> One of the major problems with the game are that if you click a 
>> box(AjaxEventBehavior) while the heartbeat(AbstractAjaxTimerBehavior) 
>> are in process you will get an error, since the box's component has 
>> changed and no longer carries that behavior. I've tried to solve this 
>> by adding a transparent veil to the page once the heartbeat 
>> processes, it's simply not good enough, it's still possible to get 
>> errors. So how do I solve this?
>>
>> I have one idea but im not liking it, all box's could have behaviors 
>> even if you wont get an score, that way we will not get an error.
>>
>>
>> This is a potential pitfall if you ever will have two Ajax components 
>> that can remove the ones behavior, if the user clicks the other while 
>> loading then it's gonna complain. On the other hand im not sure what 
>> wicket can do besides throw a runtime exception.
>>
> Can't you use synchronized (obj) { ... }, to serialize multiple 
> threads of each ajax call?
>
>
> Adriano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: The Wicket Reflex Game Post thoughts?

Posted by Johan Compagner <jc...@gmail.com>.
sync doesnt help in the area one bit
Because wicket already does that for you
The problem is that just after 1 ajax call that replaces/removes/what ever a
component another 1 is already waiting and want to execute.

in 1.5 we have to have a hash instead of the id i guess and silent failure
when the behavior is gone

But matej is working on that so everything will be great

johan


On Sat, Sep 27, 2008 at 3:16 AM, Adriano dos Santos Fernandes <
adrianosf@uol.com.br> wrote:

> Nino Saturnino Martinez Vazquez Wael wrote:
>
>> Hi Guys
>>
>> One of the major problems with the game are that if you click a
>> box(AjaxEventBehavior) while the heartbeat(AbstractAjaxTimerBehavior) are in
>> process you will get an error, since the box's component has changed and no
>> longer carries that behavior. I've tried to solve this by adding a
>> transparent veil to the page once the heartbeat processes, it's simply not
>> good enough, it's still possible to get errors. So how do I solve this?
>>
>> I have one idea but im not liking it, all box's could have behaviors even
>> if you wont get an score, that way we will not get an error.
>>
>>
>> This is a potential pitfall if you ever will have two Ajax components that
>> can remove the ones behavior, if the user clicks the other while loading
>> then it's gonna complain. On the other hand im not sure what wicket can do
>> besides throw a runtime exception.
>>
>>  Can't you use synchronized (obj) { ... }, to serialize multiple threads
> of each ajax call?
>
>
> Adriano
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: The Wicket Reflex Game Post thoughts?

Posted by Adriano dos Santos Fernandes <ad...@uol.com.br>.
Nino Saturnino Martinez Vazquez Wael wrote:
> Hi Guys
>
> One of the major problems with the game are that if you click a 
> box(AjaxEventBehavior) while the heartbeat(AbstractAjaxTimerBehavior) 
> are in process you will get an error, since the box's component has 
> changed and no longer carries that behavior. I've tried to solve this 
> by adding a transparent veil to the page once the heartbeat processes, 
> it's simply not good enough, it's still possible to get errors. So how 
> do I solve this?
>
> I have one idea but im not liking it, all box's could have behaviors 
> even if you wont get an score, that way we will not get an error.
>
>
> This is a potential pitfall if you ever will have two Ajax components 
> that can remove the ones behavior, if the user clicks the other while 
> loading then it's gonna complain. On the other hand im not sure what 
> wicket can do besides throw a runtime exception.
>
Can't you use synchronized (obj) { ... }, to serialize multiple threads 
of each ajax call?


Adriano


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: The Wicket Reflex Game Post thoughts?

Posted by Nino Saturnino Martinez Vazquez Wael <ni...@jayway.dk>.
Okay, so I've remade the internals so you now always can click every 
cell so the game should be a lot more stable now. However only active 
cells give points..

Also some of the exploits should be cleaned..


Nino Saturnino Martinez Vazquez Wael wrote:
> Hi Guys
>
> One of the major problems with the game are that if you click a 
> box(AjaxEventBehavior) while the heartbeat(AbstractAjaxTimerBehavior) 
> are in process you will get an error, since the box's component has 
> changed and no longer carries that behavior. I've tried to solve this 
> by adding a transparent veil to the page once the heartbeat processes, 
> it's simply not good enough, it's still possible to get errors. So how 
> do I solve this?
>
> I have one idea but im not liking it, all box's could have behaviors 
> even if you wont get an score, that way we will not get an error.
>
>
> This is a potential pitfall if you ever will have two Ajax components 
> that can remove the ones behavior, if the user clicks the other while 
> loading then it's gonna complain. On the other hand im not sure what 
> wicket can do besides throw a runtime exception.
>

-- 
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org