How to display alert or pop up dialog from java class?

i am using swing component to give pop up dialog in java class. JOptionPane.showMessageDialog(null,“Hello”); But its not displaying anything. Is there any way in nuxeo to give alert from java class. Thanks

1 votes

2 answers



You should never use AWT components in a server component. You should only serve web pages. Here is what you will get running your listener.

The message box will be displayed on the server display. The listener thread will block until the ok button is pressed. The end user, will never be notified of the error condition, and in the same time, you're leaking core sessions (blocked thread). At the end, you will consume all the connections from the database, and the server will die.

Since 5.6, in a core listener, in case of the transaction being set rollback only, you may throw an exception which will be handled by the web exception handler and the message will be displayed to your end user.

Please contact our support if you need help for that feature.

0 votes


Can you explain to me what do you want to display? Where? In your browser? What kind of client you use with Nuxeo?

0 votes

In the Listener class in handleEvent() function i am checking duplicate folder by title is if exist than i want to notify the end user this folder name is already exist do you want to copy or not.My doubt is how can i notify the end user from listener. Is there any where nuxeo is notifying any alert from listener.Please help me how to notify the end user from a listener.