I'm trying to make a simple exception handling in my Tapestry app where I'd display only certain info.

For that matter, I'm trying to use <dialog>.

However, I'm not sure how to call the actual dialog.showModal(); from Tapestry Java code.

I've been poking on the internet, and I've seen some mention putting my JS in Mixin, but I'm not quite sure how to accomplish that.

The exception can happen in any of the java code I'm running, so I'm not rly sure how to proceed there.

有帮助吗?

解决方案

Take a look at this recipe from the official Tapestry cookbook.

Basically, provide a custom ExceptionReport page that implements the ExceptionReporter interface and you are good to go.

Update: The jumpstart provides an example to help you out.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top