Hi again!
I ran the Quickstart_wicket application and there it seems to work perfectly.
So the problem is somewhere on my side, I guess. :-(
Christian
________________________________________
From: Christian Steinebach [[email protected]]
Sent: Friday, February 22, 2013 11:06 AM
To: [email protected]
Subject: RE: Wicket viewer now handles notifications, warnings and exceptions
Hi Dan,
warnUser() didn't do anything. Went into MessageBrokerDefault().addWarning()
but then seem to proceed as usual.
raiseError() leads to that sendEvent() returns nothing (No records found).
Next time I the TransportDemand is displayed the error message pops up in the
right upper corner.
> public TransportDemand sendEvent(@Named("Event") Event event,
> @Named("Leg") InstantiatedServedRoute sr,
> @Named("Comment") String comment) {
> processEvent(event, sr, comment);
> //warnUser(event + ": " + comment);
> raiseError(event + ": " + comment);
> return this;
> }
>
I'll try to reproduce the behaviour in a more consistent way... ;-)
Christian
________________________________________
From: Dan Haywood [[email protected]]
Sent: Friday, February 22, 2013 1:58 AM
To: [email protected]
Subject: Re: Wicket viewer now handles notifications, warnings and exceptions
ok, think I've figured it out. Try again.
On 22 February 2013 00:22, Christian Steinebach <
[email protected]> wrote:
> Hi Dan!
>
> First time I called warnUser(), nothing happened :-(
>
yup, the JQuery wasn't loaded, I think.
> How should the the methods be used? I called warnUser() in an action
> method.
>
> public TransportDemand sendEvent(@Named("Event") Event event,
> @Named("Leg") InstantiatedServedRoute sr,
> @Named("Comment") String comment) {
> processEvent(event, sr, comment);
> warnUser(event + ": " + comment);
> return this;
> }
>
> Would that be ok?
>
yup.
>
> What are the two buttons supposed to do, 'Normal ok' and 'Ajax ok'?
>
removed - was left by accident.
Also.. try throwing a RuntimeException from a method, and check get
directed to the new error page.
Cheers
Dan
>
> Regards
> Christian
>
>
> ________________________________________
> From: Dan Haywood [[email protected]]
> Sent: Thursday, February 21, 2013 8:40 PM
> To: users
> Subject: Wicket viewer now handles notifications, warnings and exceptions
>
> fyi, just checked in a couple of enhancements for the Wicket viewer
> (ISIS-349, ISIS-350):
>
> * getContainer().informUser(...) will raise a growl-like notification;
> this hides automatically after a while [blue accent colour]
> * getContainer().warnUser(...) raises a similar notification, but which
> must be acknowledged [orange]
> * getContainer().raiseError(...) also raises a notification, but which must
> be acknowledged [red]
>
> As an alternative to raiseError(), you can also just throw new
> ApplicationException(...) - defined in the applib. The two are equivalent,
> use whichever you prefer.
>
> In addition, if any unhandled runtime exceptions occur, these are now
> caught and rendered more pleasantly than before.
>
> Check it out, let me know if you hit issues
>
> Dan
>