Expand my Community achievements bar.

Show error message dialog from java event listener

Avatar

Level 4

I have a requirement where I have a event listener written in JAVA which checks if asset upload in DAM is from the allowed extension and deletes the asset if it is not from the allowed extension list. Now immediately after deleting the asset I need to show a error dialog saying "deleted the asset because it was not allowed", I dont know how to show this dialog.

I could have shown the dialog using extJs if it was an servlet call or so but because It is listener I am struggling with this part.

I tried using the swing’s JOptionPane which but that is behaving weird because of swing's limitation I guess. Its like 

If the code is running on my machine and we try to upload asset from some other machine accessing my machine I.P in my instance’s /content/dam, then the error message in dialog appears on my machine instead of appearing on the client machine. So I think we will need to use some other approach if this is the swing’s behavior.

Please suggest any other way to achieve this.

0 Replies