选项对话框
选项对话框为应用程序提供了一种与用户交流并收集其输入的方式。这些对话框是模态的,意味着它们会阻止应用程序执行,直到用户与其交互,从而确保在继续之前首先处理重要信息。
webforJ中的选项对话框类似于Swing中的JOptionPane,解决了在Web应用程序中处理阻塞对话框的基本问题。
在webforJ中使用选项对话框创建模态对话框时,对话框会阻止用户对应用程序其他部分的输入,并仅处理模态对话框的事件。这确保了对话框保持响应,同时防止与其他部分的交互,从而提升用户体验并维护应用程序流程。服务器在对话框关闭或返回值之前将停止处理任何进一步的请求。
主题
Confirm
Show a blocking ConfirmDialog with up to three options, configurable button sets, message types, and timeout behavior.
File Chooser
Open a blocking FileChooserDialog to let users pick files or directories from the server, with selection modes and initial paths.
File Save
FileSaveDialog 是一个模态对话框,旨在允许用户将文件保存到服务器文件系统的指定位置。该对话框会阻止应用程序执行,直到用户提供文件名并确认操作或取消对话框。
File Upload
Capture client uploads with the FileUploadDialog, returning an UploadedFile that you can filter, move, and process server-side.
Input Dialog
Prompt users for text, numbers, dates, colors, or other typed values with the modal InputDialog and message-type styling.
Message
一个 MessageDialog 是一个模态对话框,旨在向用户显示消息,包含一个 OK 按钮以关闭对话框。在用户与之交互或由于超时而关闭之前,它会阻止应用程序执行。