Alert message from java class
I have a java class (event handler) that does some server-side processing. During the mid-way of processing, I do a condition
check. If it fails the condition, I would like to pop up an alert message (yes/no confirm) on the JSP that invoked this handler class. If I click, yes I should be able to proceed with the rest of server-side processing, else I return to the same jsp. Can somebody guide me with this java and javascript interation?
If the server processing involved only in data processing in DBMS you can do something like this.
Your processing places all the messages that need to be displayded in a queue.
The messages can be in three types
1 - Error Message - (Enqueuing a error message should also result in an exception)
2 - Alert message (Messages to be displayed with only a OK button)
3 - Confirmation button (Yes/No, Ok/Cancel)
after the server processing is orver the client read the content in the message queue and display them appropriatly.
if it found a error message in the queue it should abort the transaction by executing a rollback
if it found a alert message just display it
If it found a confirmation message it should be displayed the transaction should be rolled back or commited based on the users respond
if the user decided to rollback in such cases rest of the messages should be ignored.
Above approach can be used only if you can rollback the entire operation at the end of it
LRMKa at 2007-7-13 11:10:58 >
