cancel
Showing results for 
Search instead for 
Did you mean: 

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

tiger_
Champ on-the-rise
Champ on-the-rise

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

3 REPLIES 3

Vladimir_Pasqui
Star Collaborator
Star Collaborator

Hi,

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

In the Listener class in handleEvent() function i am

slacoin_Lacoin
Star Contributor
Star Contributor

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.