Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Show message to user by pop-up using web-api

SOLVED
Go to solution
Highlighted
GiuBal
Collector

Show message to user by pop-up using web-api

Hello guys,
I just create a web-api application in SD 5 to create Incident from SC ... now I have to notify to user if all requested fields are filled into Service Call to avoid error during java execution. Is there a method to display a pop-up error instead classic mode ?
if (args.length < 3) {
System.err.println("Usage : SD_make_inc ";
return;
}

Thanks a lot
3 REPLIES
Dean Morrell
Frequent Visitor
Solution

Re: Show message to user by pop-up using web-api

Giuseppe,

If I understand the question correctly, you're looking for a way to 'pop-up' a GUI dialog box containing the usage directions, instead of having the usage directions print to the console?

If you already have a JFrame created, I would look at using the javax.swing.JOptionPane class to construct a dialog...

It's been a year or so since I've worked with AWT or swing, so I don't remember the specifics of how to do it, but I imagine it's all in the API.

Hope this helps!
-d

I know the voices in my head aren't real, but they still have some REALLY FUN ideas.
Radovan Skolnik
Honored Contributor

Re: Show message to user by pop-up using web-api

What Dean suggests is OK if you're creating your GUI in Java. If it is WEB based (i.e. JSP or something like that) you need to generate the popup as a new HTML window (that's done by using target="blank" or something liek that).

GiuBal
Collector

Re: Show message to user by pop-up using web-api

Thanks for suggestion, I will try it soon.
//Add this to "OnDomLoad" event