onsubmit() {
try { ... blah ... } catch (ValidationException e) { errors(e); } }
where errors() reports the errors to the page.
I think its explicit and clear.
if you really dont like this, you can always create your own subclass of button like you said.
we will be rewriting the whole requestcycle processing for 1.2 so we dont even know if invokeinterface() will still be there or how it will look.
this is my 2 cents, maybe another devel feels different and then he can go ahead and make it protected for you.
-Igor
On 11/16/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>see
>
>protected Page onRuntimeException(final Page page, final RuntimeException >e)
>
>in the Application class
I've seen this method, but regretfully it doesn't fit. It is called by RequestCycle.internalOnRuntimeException() which:
- doesn't get hands on the current page
Line 415:
catch (RuntimeException e)
{
// Handle any runtime exception
internalOnRuntimeException(null, e);
}
- always logs an error, although in my case the exception is *not* unexpected:
Line 785:
log.error("Unexpected runtime exception [page = " + page + "]", e);
- it schedules a redirect while I just need the current page to be redisplayed:
Line 804:
redirectTo(redirectTo);
We could introduce new callbacks on the page (e.g. an corresponding onRuntimeException() for internalOnRuntimeException()) but the simplest would be to make invokeInterface(Component,Method,Page page) protected.
Perhaps you see another solution?
Sven
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
Register for a JBoss Training Course. Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
