org.directwebremoting.ui.browser
Class Window

java.lang.Object
  extended by org.directwebremoting.ui.browser.Window

public class Window
extends java.lang.Object

A copy of some of the functions from the Window DOM object on the server

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Nested Class Summary
static class Window.OptionBuilder
          Aide to building windowFeatures strings.
 
Constructor Summary
Window()
           
 
Method Summary
static void alert(java.lang.String message)
          Show in an 'alert' dialog
static void close()
          Attempt to close this window
static void confirm(java.lang.String message, Callback<java.lang.Boolean> callback)
          Show a 'confirm' dialog
static void open(java.lang.String url, java.lang.String windowName)
          Open a new browser child window, pointing at given url and identified with a given windowName.
static void open(java.lang.String url, java.lang.String windowName, Window.OptionBuilder builder)
          Open a new browser child window, pointing at given url and identified with a given windowName.
static void open(java.net.URI uri, java.lang.String windowName)
          Open a new browser child window, pointing at given uri and identified with a given windowName.
static void open(java.net.URI uri, java.lang.String windowName, Window.OptionBuilder builder)
          Open a new browser child window, pointing at given uri and identified with a given windowName.
static void open(java.net.URL url, java.lang.String windowName)
          Open a new browser child window, pointing at given url and identified with a given windowName.
static void open(java.net.URL url, java.lang.String windowName, Window.OptionBuilder builder)
          Open a new browser child window, pointing at given url and identified with a given windowName.
static void prompt(java.lang.String message, Callback<java.lang.String> callback)
          Show a 'prompt' dialog
static void setLocation(java.lang.String newPage)
          Navigate to a new page
static void setLocation(java.net.URI newPage)
          Navigate to a new page
static void setLocation(java.net.URL newPage)
          Navigate to a new page
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Window

public Window()
Method Detail

alert

public static void alert(java.lang.String message)
Show in an 'alert' dialog

Parameters:
message - The text to go into the alert box

confirm

public static void confirm(java.lang.String message,
                           Callback<java.lang.Boolean> callback)
Show a 'confirm' dialog

Parameters:
message - The text to go into the alert box
callback - The function to be called when a browser replies

prompt

public static void prompt(java.lang.String message,
                          Callback<java.lang.String> callback)
Show a 'prompt' dialog

Parameters:
message - The text to go into the alert box
callback - The function to be called when a browser replies

close

public static void close()
Attempt to close this window


setLocation

public static void setLocation(java.net.URI newPage)
Navigate to a new page

Parameters:
newPage - The page to navigate to

setLocation

public static void setLocation(java.net.URL newPage)
Navigate to a new page

Parameters:
newPage - The page to navigate to

setLocation

public static void setLocation(java.lang.String newPage)
Navigate to a new page

Parameters:
newPage - The page to navigate to

open

public static void open(java.lang.String url,
                        java.lang.String windowName)
Open a new browser child window, pointing at given url and identified with a given windowName.

See Also:
for more details

open

public static void open(java.net.URL url,
                        java.lang.String windowName)
Open a new browser child window, pointing at given url and identified with a given windowName.

See Also:
for more details

open

public static void open(java.net.URI uri,
                        java.lang.String windowName)
Open a new browser child window, pointing at given uri and identified with a given windowName.

See Also:
for more details

open

public static void open(java.lang.String url,
                        java.lang.String windowName,
                        Window.OptionBuilder builder)
Open a new browser child window, pointing at given url and identified with a given windowName.

Parameters:
windowName - The window name can be one of the special values: _blank, _parent, _self, _top.

open

public static void open(java.net.URL url,
                        java.lang.String windowName,
                        Window.OptionBuilder builder)
Open a new browser child window, pointing at given url and identified with a given windowName.

See Also:
for more details

open

public static void open(java.net.URI uri,
                        java.lang.String windowName,
                        Window.OptionBuilder builder)
Open a new browser child window, pointing at given uri and identified with a given windowName.

See Also:
for more details

Copyright 2008