Hi Tim, thanks for the information, but I know a web 2 tools,named Unify NXJ(not open,and not JSF) that
has a feature like that.. I don´t know how they do, but they do...
About the a javascript to do the yesno before the submitting,
the Icefaces (where you can send information to the browser from the server using server side async rendering ) has the ice:panelConfirmation that works great for that.
Follow the Unify NXJ´s API for their yesno function
public final int optionButtonPrompt(String message,
String[] options,
int defaultOptionIndex,
int promptTimeoutInterval)
throws NXJPromptClientLostException
Prompts a message to the user during execution of an application. The optionButtonPrompt is used for prompting messages in a dialog. The dialog contains buttons for each of the options specified. Choosing a button returns the index of the option. Choosing Cancel returns -1. If the user does not respond within the specified time interval, it returns -2.
The optionButtonPrompt is used to display a prompt message with a set of buttons (one for each option, plus one for the Cancel button) used by the user to supply the answer. Choosing an option button returns the index of the option. Choosing Cancel (or closing the window) returns NXJSession.PROMPT_CANCEL (-1). If the user does not respond within the specified prompt timeout interval, the prompt is programatically dismissed and NXJSession.PROMPT_TIMEOUT (-2) is returned. If the specified prompt timeout interval is less than or equal to 0, then the prompt will not be programatically dismissed.
Parameters:
message - the prompt message (may include html markup).
options - the list of options to choose from.
defaultOptionIndex - the index of the option (zero-based) that should be indicated as the default.
promptTimeoutInterval - if greater than 0, the time interval (in seconds) to wait before the prompt times out; otherwise, the prompt will wait indefinitely.
Returns:
index of selected option (zero-based); NXJSession.PROMPT_CANCEL (-1), if the prompt was cancelled by the user; NXJSession.PROMPT_TIMEOUT (-2), if the prompt was programatically dismissed because the user did not respond within the specified prompt timeout interval. NXJSession.PROMPT_BLOCKED (-3), if the prompt was blocked by the browser.
Throws:
NXJPromptClientLostException - thrown if this thread has timed out waiting for the response. Typically, this occurs when the browser machine or network goes down. Note that this timeout is 300 seconds greater than the prompt timeout interval (if specified); hence, it gives the browser side javascript plenty of time to send the prompt timeout response. Whenever the prompt timeout response is 0, than this method uses the http session timeout value to determine how long it should wait before throwing this exception (in most Java application servers, this defaults to 30 minutes).
See Also:
messageBoxPrompt(java.lang.String), optionPrompt(java.lang.String, java.lang.String, java.lang.String[], int), optionListPrompt(java.lang.String, java.lang.String[], int)