Question to DataTable and ReuseIfModelsEqualStrategy

2015-12-17 Thread Patrick Davids

Hi all,
I have a problem with an ComponentNotFoundExceptions when multiple 
ajax-request are fired with refreshing components and I fixed it using a 
ReuseIfModelsEqualStrategy in my refreshing DataTable.


But I'm not sure about the consequences using ReuseIfModelsEqualStrategy.

This is my case:
Panel
DataTable
(rows with columns)
Spinner with ajax-request refreshing the 
DataTable on change/spin


The Spinner has an AjaxChannel.QUEUE not too loose any data, when the 
user does multiple fast clicks.


Now the problem:
If the user is very fast with the mouse and uses the Spinner of the next 
row in the DataTable, while the previous Spinner is still working on its 
AjaxChannel.QUEUE and always refreshes the DataTable I run into 
ComponentNotFoundExceptions, when the first click of the next used 
Spinner is occuring.


Using ReuseIfModelsEqualStrategy for the DataTable, it is working, 
because the Items and componenents are reused.


I never used the ReuseIfModelsEqualStrategy before and while reading the 
javadoc, I am not sure about the equals() details and if I understood it 
really, really right.


Is it quite save to use the ReuseIfModelsEqualStrategy?
What are the pitfalls using it?

Thanx for any feedback and know-how!

kind regards
Patrick

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



Re: Question to DataTable and ReuseIfModelsEqualStrategy

2015-12-17 Thread Ernesto Reinaldo Barreiro
where pageLoadingFrame is just a custom blocking logic.

On Thu, Dec 17, 2015 at 10:02 AM, Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Use a veil to block screen while AJAX is bussy.
>
>
> Wicket.Event.subscribe('/ajax/call/before', function(jqEvent, attributes,
> jqXHR, errorThrown, textStatus) {
> pageLoadingFrame("show");
> });
>
> Wicket.Event.subscribe('/ajax/call/complete', function(jqEvent,
> attributes, jqXHR, errorThrown, textStatus) {
> setTimeout(function(){
> pageLoadingFrame("hide");
> },500);
> });
>
> You can do that globaly as above...
>
> On Thu, Dec 17, 2015 at 9:35 AM, Patrick Davids <
> patrick.dav...@nubologic.com> wrote:
>
>> Hi all,
>> I have a problem with an ComponentNotFoundExceptions when multiple
>> ajax-request are fired with refreshing components and I fixed it using a
>> ReuseIfModelsEqualStrategy in my refreshing DataTable.
>>
>> But I'm not sure about the consequences using ReuseIfModelsEqualStrategy.
>>
>> This is my case:
>> Panel
>> DataTable
>> (rows with columns)
>> Spinner with ajax-request refreshing the
>> DataTable on change/spin
>>
>>
>> The Spinner has an AjaxChannel.QUEUE not too loose any data, when the
>> user does multiple fast clicks.
>>
>> Now the problem:
>> If the user is very fast with the mouse and uses the Spinner of the next
>> row in the DataTable, while the previous Spinner is still working on its
>> AjaxChannel.QUEUE and always refreshes the DataTable I run into
>> ComponentNotFoundExceptions, when the first click of the next used Spinner
>> is occuring.
>>
>> Using ReuseIfModelsEqualStrategy for the DataTable, it is working,
>> because the Items and componenents are reused.
>>
>> I never used the ReuseIfModelsEqualStrategy before and while reading the
>> javadoc, I am not sure about the equals() details and if I understood it
>> really, really right.
>>
>> Is it quite save to use the ReuseIfModelsEqualStrategy?
>> What are the pitfalls using it?
>>
>> Thanx for any feedback and know-how!
>>
>> kind regards
>> Patrick
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>



-- 
Regards - Ernesto Reinaldo Barreiro


Re: Question to DataTable and ReuseIfModelsEqualStrategy

2015-12-17 Thread Ernesto Reinaldo Barreiro
Use a veil to block screen while AJAX is bussy.


Wicket.Event.subscribe('/ajax/call/before', function(jqEvent, attributes,
jqXHR, errorThrown, textStatus) {
pageLoadingFrame("show");
});

Wicket.Event.subscribe('/ajax/call/complete', function(jqEvent, attributes,
jqXHR, errorThrown, textStatus) {
setTimeout(function(){
pageLoadingFrame("hide");
},500);
});

You can do that globaly as above...

On Thu, Dec 17, 2015 at 9:35 AM, Patrick Davids <
patrick.dav...@nubologic.com> wrote:

> Hi all,
> I have a problem with an ComponentNotFoundExceptions when multiple
> ajax-request are fired with refreshing components and I fixed it using a
> ReuseIfModelsEqualStrategy in my refreshing DataTable.
>
> But I'm not sure about the consequences using ReuseIfModelsEqualStrategy.
>
> This is my case:
> Panel
> DataTable
> (rows with columns)
> Spinner with ajax-request refreshing the
> DataTable on change/spin
>
>
> The Spinner has an AjaxChannel.QUEUE not too loose any data, when the user
> does multiple fast clicks.
>
> Now the problem:
> If the user is very fast with the mouse and uses the Spinner of the next
> row in the DataTable, while the previous Spinner is still working on its
> AjaxChannel.QUEUE and always refreshes the DataTable I run into
> ComponentNotFoundExceptions, when the first click of the next used Spinner
> is occuring.
>
> Using ReuseIfModelsEqualStrategy for the DataTable, it is working, because
> the Items and componenents are reused.
>
> I never used the ReuseIfModelsEqualStrategy before and while reading the
> javadoc, I am not sure about the equals() details and if I understood it
> really, really right.
>
> Is it quite save to use the ReuseIfModelsEqualStrategy?
> What are the pitfalls using it?
>
> Thanx for any feedback and know-how!
>
> kind regards
> Patrick
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Regards - Ernesto Reinaldo Barreiro


Re: Question to DataTable and ReuseIfModelsEqualStrategy

2015-12-17 Thread Sven Meier

Hi,

>Is it quite save to use the ReuseIfModelsEqualStrategy?
>What are the pitfalls using it?

as long as you follow the instructions in its JavaDoc I see no problem 
in using this strategy.


Why are you refreshing the whole table instead of a single row only? If 
you did the latter, you won't get ComponentNotFoundExceptions either.


Have fun
Sven



On 17.12.2015 09:35, Patrick Davids wrote:

Hi all,
I have a problem with an ComponentNotFoundExceptions when multiple 
ajax-request are fired with refreshing components and I fixed it using 
a ReuseIfModelsEqualStrategy in my refreshing DataTable.


But I'm not sure about the consequences using ReuseIfModelsEqualStrategy.

This is my case:
Panel
DataTable
(rows with columns)
Spinner with ajax-request refreshing the DataTable on 
change/spin



The Spinner has an AjaxChannel.QUEUE not too loose any data, when the 
user does multiple fast clicks.


Now the problem:
If the user is very fast with the mouse and uses the Spinner of the 
next row in the DataTable, while the previous Spinner is still working 
on its AjaxChannel.QUEUE and always refreshes the DataTable I run into 
ComponentNotFoundExceptions, when the first click of the next used 
Spinner is occuring.


Using ReuseIfModelsEqualStrategy for the DataTable, it is working, 
because the Items and componenents are reused.


I never used the ReuseIfModelsEqualStrategy before and while reading 
the javadoc, I am not sure about the equals() details and if I 
understood it really, really right.


Is it quite save to use the ReuseIfModelsEqualStrategy?
What are the pitfalls using it?

Thanx for any feedback and know-how!

kind regards
Patrick

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




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



Re: Question to DataTable and ReuseIfModelsEqualStrategy

2015-12-17 Thread Patrick Davids

Hi Sven,

> Why are you refreshing the whole table instead of a single row only?
At the end of the table is a ButtomToolBar calculating sums of all rows.
(the Spinner is for changing amounts / prices for an item in the rows)

How can I refresh a single row? This would help a bit (than, later, I 
could refresh the BottomToolBar by wickets event bus).


But I'm in a AbstractColumn...
@Override
public void populateItem(Item cellItem, String 
componentId, final IModel rowModel) {

...
}
I don't have access to the row.

Patrick


Am 17.12.2015 um 10:40 schrieb Sven Meier:

Hi,

 >Is it quite save to use the ReuseIfModelsEqualStrategy?
 >What are the pitfalls using it?

as long as you follow the instructions in its JavaDoc I see no problem
in using this strategy.

Why are you refreshing the whole table instead of a single row only? If
you did the latter, you won't get ComponentNotFoundExceptions either.

Have fun
Sven



On 17.12.2015 09:35, Patrick Davids wrote:

Hi all,
I have a problem with an ComponentNotFoundExceptions when multiple
ajax-request are fired with refreshing components and I fixed it using
a ReuseIfModelsEqualStrategy in my refreshing DataTable.

But I'm not sure about the consequences using ReuseIfModelsEqualStrategy.

This is my case:
Panel
DataTable
(rows with columns)
Spinner with ajax-request refreshing the DataTable on
change/spin


The Spinner has an AjaxChannel.QUEUE not too loose any data, when the
user does multiple fast clicks.

Now the problem:
If the user is very fast with the mouse and uses the Spinner of the
next row in the DataTable, while the previous Spinner is still working
on its AjaxChannel.QUEUE and always refreshes the DataTable I run into
ComponentNotFoundExceptions, when the first click of the next used
Spinner is occuring.

Using ReuseIfModelsEqualStrategy for the DataTable, it is working,
because the Items and componenents are reused.

I never used the ReuseIfModelsEqualStrategy before and while reading
the javadoc, I am not sure about the equals() details and if I
understood it really, really right.

Is it quite save to use the ReuseIfModelsEqualStrategy?
What are the pitfalls using it?

Thanx for any feedback and know-how!

kind regards
Patrick

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




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



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