com.teamdev.jxbrowser.prompt
Interface PromptService

All Known Implementing Classes:
DefaultPromptService, SilentPromptService

public interface PromptService

Represents service that allows handling browser dialogs such as JavaScript alert, confirmation, prompt, error dialogs and other.

The PromptService can be registered using the BrowserServices.setPromptService(PromptService) method.

See Also:
DefaultPromptService, SilentPromptService, BrowserServices.setPromptService(PromptService), BrowserServices.getPromptService()

Method Summary
 void alertRequested(DialogParams params)
          Invoked when browser requests the JavaScript alert dialog.
 CloseStatus badCertificateRequested(DialogParams params)
          Invoked when the loaded web page contains bad certificate and a confirmation dialog is required to accept or decline the received certificate.
 CloseStatus confirmationRequested(DialogParams params)
          Invoked when browser request the JavaScript confirmation dialog.
 CloseStatus loginRequested(LoginParams info)
          Invoked when browser request the authentication dialog.
 CloseStatus promptRequested(PromptDialogParams params)
          Invoked when browser requests the JavaScript prompt dialog.
 CloseStatus scriptErrorRequested(ScriptErrorParams info)
          Invoked when browser requests the JavaScript error dialog.
 

Method Detail

alertRequested

void alertRequested(DialogParams params)
Invoked when browser requests the JavaScript alert dialog.

Parameters:
params - the alert dialog parameters.

promptRequested

CloseStatus promptRequested(PromptDialogParams params)
Invoked when browser requests the JavaScript prompt dialog.

Parameters:
params - the prompt dialog parameters.
Returns:
CloseStatus.OK when the dialog was closed by pressing OK button, the CloseStatus.CANCEL otherwise.

confirmationRequested

CloseStatus confirmationRequested(DialogParams params)
Invoked when browser request the JavaScript confirmation dialog.

Parameters:
params - the confirmation dialog parameters.
Returns:
CloseStatus.OK when the dialog was closed by pressing OK button, the CloseStatus.CANCEL otherwise.

loginRequested

CloseStatus loginRequested(LoginParams info)
Invoked when browser request the authentication dialog.

Parameters:
info - the authentication dialog parameters.
Returns:
CloseStatus.OK when the dialog was closed by pressing OK button, the CloseStatus.CANCEL otherwise.

badCertificateRequested

CloseStatus badCertificateRequested(DialogParams params)
Invoked when the loaded web page contains bad certificate and a confirmation dialog is required to accept or decline the received certificate.

Parameters:
params - the dialog information.
Returns:
CloseStatus.OK when the dialog was closed by pressing OK button, the CloseStatus.CANCEL otherwise.

scriptErrorRequested

CloseStatus scriptErrorRequested(ScriptErrorParams info)
Invoked when browser requests the JavaScript error dialog.

Parameters:
info - the JavaScript error dialog information.
Returns:
CloseStatus.OK when the dialog was closed by pressing OK button, the CloseStatus.CANCEL otherwise.