You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Decebal Suiu <de...@asf.ro> on 2010/06/22 16:54:54 UTC

handling error in DataProvider

Hi

I have a panel (dashboard) with few data tables (widgets). When an error
appears in a data table model (data provider) I want to inform the user
about error, replacing the table component with a error panel.

It's possible to achieve this functionality in wicket or you can suggest
me another approach?  


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


Re: handling error in DataProvider

Posted by Igor Vaynberg <ig...@gmail.com>.
RequestCycle#onBeginRequest() may be a good place

On Jun 29, 2010 3:04 AM, "Decebal Suiu" <de...@asf.ro> wrote:


Thanks again, I will try to profile my code.
Another question is where I can clean my flags with errors (I keep in
session a Map with widget's id as key and Exception as value)? I understand
that onAfterRender method is not a good candidate because it's called on
abort exception also.
--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/handling-error-in-DataProvider-tp2264242p2271960.html

Sent from the Wicket - User mailing list archive at Nabble.com.

-----------------------------------...

Re: handling error in DataProvider

Posted by Decebal Suiu <de...@asf.ro>.
Thanks again, I will try to profile my code. 
Another question is where I can clean my flags with errors (I keep in
session a Map with widget's id as key and Exception as value)? I understand
that onAfterRender method is not a good candidate because it's called on
abort exception also.
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/handling-error-in-DataProvider-tp2264242p2271960.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


Re: handling error in DataProvider

Posted by Igor Vaynberg <ig...@gmail.com>.
the exception will be thrown as many times as there are tables. but
this exception does not fill in the stack trace so it should be fast.
profile the code and see where the time is.

-igor

On Wed, Jun 23, 2010 at 1:56 AM, Decebal Suiu <de...@asf.ro> wrote:
>
> The problem with RestartResponsePage approach is that when multiple data
> tables (for example last 2 tables from 10) are in error I have a performance
> problem. Is it true my observation?
>
> Thanks,
> Decebal
> --
> View this message in context: http://apache-wicket.1842946.n4.nabble.com/handling-error-in-DataProvider-tp2264242p2265293.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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


Re: handling error in DataProvider

Posted by Decebal Suiu <de...@asf.ro>.
The problem with RestartResponsePage approach is that when multiple data
tables (for example last 2 tables from 10) are in error I have a performance
problem. Is it true my observation?

Thanks,
Decebal
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/handling-error-in-DataProvider-tp2264242p2265293.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


Re: handling error in DataProvider

Posted by Decebal Suiu <de...@asf.ro>.
Hi igor,

You say that in IDataProvider.iterator(..) if an error occurs I throw a
RestartResponseException (probably with exception message as PageParameter). 
But my panel has many data tables. How can I use your approach if errors
occur simultaneous in many data tables?

Thanks,
Decebal
-- 
View this message in context: http://apache-wicket.1842946.n4.nabble.com/handling-error-in-DataProvider-tp2264242p2264757.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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


Re: handling error in DataProvider

Posted by Igor Vaynberg <ig...@gmail.com>.
you can set a flag on the page when an error occurs and throw a
RestartResponseException(page)

-igor

On Tue, Jun 22, 2010 at 7:54 AM, Decebal Suiu <de...@asf.ro> wrote:
> Hi
>
> I have a panel (dashboard) with few data tables (widgets). When an error
> appears in a data table model (data provider) I want to inform the user
> about error, replacing the table component with a error panel.
>
> It's possible to achieve this functionality in wicket or you can suggest
> me another approach?
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

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