com.sdm.quasar.client.showcase.jsf.application
Class ShowcaseDialogParameterHandler

java.lang.Object
  extended bycom.sdm.quasar.client.jsf.dialog.DefaultDialogParameterHandler
      extended bycom.sdm.quasar.client.showcase.jsf.application.ShowcaseDialogParameterHandler
All Implemented Interfaces:
DialogParameterHandler

public class ShowcaseDialogParameterHandler
extends DefaultDialogParameterHandler


Field Summary
 
Fields inherited from interface com.sdm.quasar.client.jsf.dialog.DialogParameterHandler
DIALOG_PARAMETER_HANDLER_CONFIG_KEY
 
Constructor Summary
ShowcaseDialogParameterHandler()
           
 
Method Summary
 boolean checkIsAjaxRequest(HttpServletRequest request, ServletResponse response)
          The indication of an AJAX request depends on the concrete ajax framework.
 boolean handleInvalidSequenceNumber(HttpServletRequest request, ServletResponse response, DialogControl sessionDialogControl, DialogInstanceId dialogInstanceId, java.lang.String webPageUrl, DialogParameterHandlerCallback callback)
          The sequence number is invalid: the request was from a dialog in an old state or a double submit of the same request.
 boolean handleMissingDialogParameters(HttpServletRequest request, ServletResponse response, DialogControl sessionDialogControl, DialogParameterHandlerCallback callback)
          This method is called when the dialog parameters, i.e. the dialog id or the dialog instance id, are incomplete. This may be a request to enter the application, a request from a bookmark or a request from a dialog that is closed and should not be recreated automatically.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShowcaseDialogParameterHandler

public ShowcaseDialogParameterHandler()
Method Detail

handleMissingDialogParameters

public boolean handleMissingDialogParameters(HttpServletRequest request,
                                             ServletResponse response,
                                             DialogControl sessionDialogControl,
                                             DialogParameterHandlerCallback callback)
Description copied from class: DefaultDialogParameterHandler
This method is called when the dialog parameters, i.e. the dialog id or the dialog instance id, are incomplete. This may be a request to enter the application, a request from a bookmark or a request from a dialog that is closed and should not be recreated automatically.

Specified by:
handleMissingDialogParameters in interface DialogParameterHandler
Overrides:
handleMissingDialogParameters in class DefaultDialogParameterHandler
See Also:
com.sdm.quasar.client.jsf.dialog.DefaultDialogParameterHandler#handleMissingDialogParameters(javax.servlet.http.HttpServletRequest, javax.servlet.ServletResponse, com.sdm.quasar.client.core.dialog.DialogControl, com.sdm.quasar.client.jsf.dialog.DialogParameterHandlerCallback)

handleInvalidSequenceNumber

public boolean handleInvalidSequenceNumber(HttpServletRequest request,
                                           ServletResponse response,
                                           DialogControl sessionDialogControl,
                                           DialogInstanceId dialogInstanceId,
                                           java.lang.String webPageUrl,
                                           DialogParameterHandlerCallback callback)
Description copied from class: DefaultDialogParameterHandler
The sequence number is invalid: the request was from a dialog in an old state or a double submit of the same request. Thus we throw an Exception to avoid double submit or request based on old data. You can override this to display your own dialog. For example see the implementation of this method in the showcase. If you do not use sequence numbers, just return.

Specified by:
handleInvalidSequenceNumber in interface DialogParameterHandler
Overrides:
handleInvalidSequenceNumber in class DefaultDialogParameterHandler
See Also:
com.sdm.quasar.client.jsf.dialog.DefaultDialogParameterHandler#handleInvalidSequenceNumber(javax.servlet.http.HttpServletRequest, javax.servlet.ServletResponse, com.sdm.quasar.client.core.dialog.DialogControl, com.sdm.quasar.client.core.dialog.DialogInstanceId, com.sdm.quasar.client.jsf.dialog.DialogParameterHandlerCallback)

checkIsAjaxRequest

public boolean checkIsAjaxRequest(HttpServletRequest request,
                                  ServletResponse response)
Description copied from interface: DialogParameterHandler
The indication of an AJAX request depends on the concrete ajax framework. Please take a look at the request parameters to tell us if we are dealing with an AJAX request.

Specified by:
checkIsAjaxRequest in interface DialogParameterHandler
Overrides:
checkIsAjaxRequest in class DefaultDialogParameterHandler
See Also:
com.sdm.quasar.client.jsf.dialog.DefaultDialogParameterHandler#checkIsAjaxRequest(javax.servlet.http.HttpServletRequest, javax.servlet.ServletResponse)