From 33613a85afc4b1481367fbe92a17ee59c240250b Mon Sep 17 00:00:00 2001 From: Sven Eisenhauer Date: Fri, 10 Nov 2023 15:11:48 +0100 Subject: add new repo --- .../quasar/client/jsf/dialog/BrowserWindow.html | 713 +++++++++++++++++++++ 1 file changed, 713 insertions(+) create mode 100644 Master/Reference Architectures and Patterns/labs/QuasarClient/api/com/sdm/quasar/client/jsf/dialog/BrowserWindow.html (limited to 'Master/Reference Architectures and Patterns/labs/QuasarClient/api/com/sdm/quasar/client/jsf/dialog/BrowserWindow.html') diff --git a/Master/Reference Architectures and Patterns/labs/QuasarClient/api/com/sdm/quasar/client/jsf/dialog/BrowserWindow.html b/Master/Reference Architectures and Patterns/labs/QuasarClient/api/com/sdm/quasar/client/jsf/dialog/BrowserWindow.html new file mode 100644 index 0000000..554cd21 --- /dev/null +++ b/Master/Reference Architectures and Patterns/labs/QuasarClient/api/com/sdm/quasar/client/jsf/dialog/BrowserWindow.html @@ -0,0 +1,713 @@ + + + + + + +BrowserWindow (Quasar Client Building Blicks API) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +com.sdm.quasar.client.jsf.dialog +
+Class BrowserWindow

+
+java.lang.Object
+  extended bycom.sdm.quasar.client.jsf.dialog.BrowserWindow
+
+
+
+
public class BrowserWindow
extends java.lang.Object
+ +

+

+ This is the application side representation of the browser window. +

+

+ The BrowserWindow is responsible for managing shown or hidden + VisualRepresentations. + The VisualRepresentation of a dialog is + shown when the dialog is activated and it is hidden, when + the dialog is deactevated. To be informed about your visibility state + register a listener at your VisualRepresentation. +

+

+ Note: A deactivated but not closed dialog + is activated by user code only (i.e. a controlling dialog of the concerning dialog) + never by the framework. +

+

+ The BrowserWindow supports to show modal and non modal dialogs + and hide dialogs with four different strategies concerning backnavigation + to the corresponding page: +

+ Default is hide and reopen. Be carefull using modal dialogs and other than the default hide + strategy: The browser navigation will not always match the users expection. If you use + modal dialogs, make them singletons to get less problems with multi windows! +

+

+ Note: Up to now there will be only one instance of this at all, because we can't + control new browser windows sufficiently. This has shortcomming for correct + information about visibility of VisualRepresentation and + modal dialogs that are no singletons when more than one browser windows are opend. +

+

+ +

+

+
Author:
+
Martin Haft
+
+
+ +

+ + + + + + + + + + + + + + + + +
+Constructor Summary
BrowserWindow(java.lang.String browserWindowId) + +
+          A BrowserWindow with no history is constructed
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ java.lang.StringbuildActionURL(java.lang.String requestContextPath) + +
+           
+ java.lang.StringbuildIdFromPostParameters() + +
+           
+protected  booleancheckSequenceNumber(DialogInstanceId dialogInstanceId, + java.lang.Integer sequenceNumber) + +
+          Check correct sequece number to detect double submit
+ booleandetermineVisualRepresentation(HttpServletRequest request, + BrowserWindowCallBack callBack) + +
+          Analyses the request parameters and determines the page to be shown. +
+protected  VisualRepresentationfindPredecessor(VisualRepresentation from) + +
+           
+ java.lang.StringgetBrowserWindowId() + +
+           
+protected  VisualRepresentationgetPredecessor(VisualRepresentation visRep) + +
+           
+ java.util.SetgetRegisteredVisualRepresentations() + +
+           
+ VisualRepresentationgetVisualRepresentation() + +
+           
+protected  VisualRepresentationInfogetVisualRepresentationInfo(VisualRepresentation visRep) + +
+           
+protected  booleanhandleDoubleSubmit(HttpServletRequest request, + BrowserWindowCallBack callBack, + VisualRepresentation visRep) + +
+          Checks if this is a request to a previous state of the dialog. +
+ booleanhasCurrentPage() + +
+           
+ voidhideVisualRepresentation(VisualRepresentation visRep, + boolean recreate, + java.lang.String redirectUrl, + java.lang.String replacingDialogId, + java.lang.Object context) + +
+          Marks the VisualRepresentation to be not shown any more.
+protected  voidsetPredecessor(VisualRepresentation visRep, + VisualRepresentation predecessor) + +
+           
+ voidsetVisualRepresentation(VisualRepresentation newVisRep) + +
+          Sets a new VisualRepresentation to be shown in the current request.
+ voidshowRepresentation(VisualRepresentation visRep) + +
+          A VisualRepresentation - corresponding to a dialog - + will be shown in the browser.
+ voidshowVisualRepresentation(VisualRepresentation visRep, + boolean modal) + +
+          A VisualRepresentation - corresponding to a dialog - + will be shown in the browser.
+ java.lang.StringtoString() + +
+           
+ voidwritePostParameters(UIComponent component, + ResponseWriter writer) + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + + + + +
+Constructor Detail
+ +

+BrowserWindow

+
+public BrowserWindow(java.lang.String browserWindowId)
+
+
A BrowserWindow with no history is constructed +

+

Parameters:
browserWindowId - the id of this BrowserWindow
+ + + + + + + + +
+Method Detail
+ +

+getBrowserWindowId

+
+public java.lang.String getBrowserWindowId()
+
+
+ +
Returns:
the id of this browser window
+
+
+
+ +

+showVisualRepresentation

+
+public void showVisualRepresentation(VisualRepresentation visRep,
+                                     boolean modal)
+
+
A VisualRepresentation - corresponding to a dialog - + will be shown in the browser. You can set it modal: the page + could not be exited by browser navigation until it is hidden again. + Be careful with modal dialogs! +

+

+
Parameters:
visRep - The VisualRepresentation to be shown in the browser
modal - true if ths VisualRepresentation will be shown modal
+
+
+
+ +

+showRepresentation

+
+public void showRepresentation(VisualRepresentation visRep)
+
+
A VisualRepresentation - corresponding to a dialog - + will be shown in the browser. +

+

+
Parameters:
visRep - The VisualRepresentation to be shown in the browser
+
+
+
+ +

+hasCurrentPage

+
+public boolean hasCurrentPage()
+
+
+
+
+
+
+ +

+getVisualRepresentation

+
+public VisualRepresentation getVisualRepresentation()
+
+
+ +
Returns:
The VisualRepresentation to be shown in the actual request.
+
+
+
+ +

+determineVisualRepresentation

+
+public boolean determineVisualRepresentation(HttpServletRequest request,
+                                             BrowserWindowCallBack callBack)
+
+
Analyses the request parameters and determines the page to be shown. + TODO: Interface for the framework only +

+

+
Parameters:
request - The current request containing the id to identify the requested page
callBack - CallBack with exits when no page could be reconstructed or + other than the requested page will be shown. +
Returns:
true if response is completed due to redirect to other than requested dialog
+
+
+
+ +

+handleDoubleSubmit

+
+protected boolean handleDoubleSubmit(HttpServletRequest request,
+                                     BrowserWindowCallBack callBack,
+                                     VisualRepresentation visRep)
+
+
Checks if this is a request to a previous state of the dialog. + If so, the handling per ReactivationCallback is invoked. +

+

+
Parameters:
request - the actual request
callBack - a callback to handel other than the normal action
visRep - the VisualRepresentation connected to the request +
Returns:
true when request is completed e.g. due to redirect
+
+
+
+ +

+checkSequenceNumber

+
+protected boolean checkSequenceNumber(DialogInstanceId dialogInstanceId,
+                                      java.lang.Integer sequenceNumber)
+
+
Check correct sequece number to detect double submit +

+

+ +
Returns:
true if sequence number is correct
+
+
+
+ +

+setVisualRepresentation

+
+public void setVisualRepresentation(VisualRepresentation newVisRep)
+
+
Sets a new VisualRepresentation to be shown in the current request. +

+

+
Parameters:
newVisRep - the VisualRepresentation to be shown in the request.
+
+
+
+ +

+hideVisualRepresentation

+
+public void hideVisualRepresentation(VisualRepresentation visRep,
+                                     boolean recreate,
+                                     java.lang.String redirectUrl,
+                                     java.lang.String replacingDialogId,
+                                     java.lang.Object context)
+
+
Marks the VisualRepresentation to be not shown any more. If there + is a request to this hidden VisualRepresentation you can define + which of the following strategies shold be perfomed: +
    +
  • hide and reopen: a new dialog instance of the same dialog is shown + instead. Note: This strategy is not adequate for sub dialogs!
  • +
  • hide an and do not show again: a privious dialog is shown instead.
  • +
  • hide and replace by an other dialog: an new dialog of the given + dialog id will be created and shown instead
  • +
  • hide and replace by an other page: the given URL will be shown + instead
  • +
+ If the hidden page is the currently shown page, + the VisualRepresentation privious shown is now the current VisualRepresentation + for the request. +

+

+
Parameters:
visRep - the VisualRepresentation to be hidden
recreate - if true: Hide and recreate; false: redirect when redirect url or dialog is set + else hied and do not show again
redirectUrl - if != null (and recreate == false): perform redrect to this url
replacingDialogId - if != null (and recreate == false): perform redrect to this dialog
+
+
+
+ +

+getVisualRepresentationInfo

+
+protected VisualRepresentationInfo getVisualRepresentationInfo(VisualRepresentation visRep)
+
+
+
Parameters:
visRep - a VisualRepresentation +
Returns:
an object with additional informations of the given VisualRepresentation
+
+
+
+ +

+buildActionURL

+
+public java.lang.String buildActionURL(java.lang.String requestContextPath)
+
+
+
See Also:
ResponseParameterService.buildActionURL(java.lang.String)
+
+
+
+ +

+buildIdFromPostParameters

+
+public java.lang.String buildIdFromPostParameters()
+
+
+
See Also:
ResponseParameterService.buildIdFromPostParameters()
+
+
+
+ +

+writePostParameters

+
+public void writePostParameters(UIComponent component,
+                                ResponseWriter writer)
+                         throws java.io.IOException
+
+
+ +
Throws: +
java.io.IOException
See Also:
com.sdm.quasar.client.jsf.dialog.services.ResponseParameterService#writePostParameters(javax.faces.component.UIComponent, javax.faces.context.ResponseWriter)
+
+
+
+ +

+toString

+
+public java.lang.String toString()
+
+
+
+
+
+
+ +

+getRegisteredVisualRepresentations

+
+public java.util.Set getRegisteredVisualRepresentations()
+
+
+ +
Returns:
List of WebPages
+
+
+
+ +

+findPredecessor

+
+protected VisualRepresentation findPredecessor(VisualRepresentation from)
+
+
+
+
+
+
+ +

+setPredecessor

+
+protected void setPredecessor(VisualRepresentation visRep,
+                              VisualRepresentation predecessor)
+
+
+
+
+
+
+ +

+getPredecessor

+
+protected VisualRepresentation getPredecessor(VisualRepresentation visRep)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + -- cgit v1.2.3