SilverStream
Application Server 3.5

com.sssw.shr.page
Class AgpScriptHelper

java.lang.Object
 |
 +--com.sssw.shr.page.AgpScriptHelper

public class AgpScriptHelper
extends Object

Helper methods.


Constructor Summary
AgpScriptHelper()
           
 
Method Summary
 void alert(String msg)
          Brings up an alert message prompt.
 void closeWindow()
          Closes the current browser window.
 void openWindow(String url, String window, String features)
          Shows the specified page in the named window with the given parameters.
 void openWindow(String pagedesc, String window, String features, Hashtable params)
          Shows the specified page in the named window with the given parameters.
 void openWindow(String url, String window, String features, String query, String orderby)
          Shows the specified page in the named window with the specified query and orderby parameters.
 void reloadFrame(String frame)
          Reloads the specified frame.
 void reloadTopFrame()
          Reloads the toplevel frame.
 void setFrameLocation(String pagedesc)
          Moves the current frame of the browser to the given url.
 void setFrameLocation(String pagedesc, String frame)
          Moves the specified frame of the browser to the given url.
 void setFrameLocation(String pagedesc, String frame, Hashtable params)
          Moves the specified frame of the browser to the given URL with the parameters specified.
 void setFrameLocation(String pagedesc, String frame, String query, String orderby)
          Moves the specified frame of the browser to the given URL.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AgpScriptHelper

public AgpScriptHelper()
Method Detail

setFrameLocation

public void setFrameLocation(String pagedesc)
Moves the current frame of the browser to the given url.
Parameters:
pagedesc - the destination url.

setFrameLocation

public void setFrameLocation(String pagedesc,
                             String frame)
Moves the specified frame of the browser to the given url.
Parameters:
pagedesc - the destination url.
frame - the frame to move.

setFrameLocation

public void setFrameLocation(String pagedesc,
                             String frame,
                             String query,
                             String orderby)
Moves the specified frame of the browser to the given URL. The query and orderby parameters can be specified.
Parameters:
pagedesc - the destination url.
frame - the frame to move.
query - the query to pass.
orderby - the orderby.
Usage:

Assume the current frame if frame is null.


setFrameLocation

public void setFrameLocation(String pagedesc,
                             String frame,
                             Hashtable params)
Moves the specified frame of the browser to the given URL with the parameters specified.
Parameters:
pagedesc - the destination url.
frame - the frame to move.
params - a hashtable containing the parameters.
Usage:

Assume the current frame if frame is null.


openWindow

public void openWindow(String url,
                       String window,
                       String features)
Shows the specified page in the named window with the given parameters.
Parameters:
url - the page url.
window - the destination window.
features - a string representing the features. The openWindow method supports the same set of features as the JavaScript open() method.
Example:

The following code fragment opens a window with a specified dimension, tool buttons turned off, menubar turned on and status bar turned off.

 	agScriptHelper.openWindow("http://www.silverstream.com/",
 	    "SilverStream",
 	    "toolbar=false,menubar=true,status=off,width=300,height=400");
 
See Also:
AgpScriptHelper.closeWindow()

openWindow

public void openWindow(String url,
                       String window,
                       String features,
                       String query,
                       String orderby)
Shows the specified page in the named window with the specified query and orderby parameters.
Parameters:
url - the page url.
window - the destination window.
features - a string representing the features.
query - the query string.
orderby - the orderby.
See Also:
AgpScriptHelper.closeWindow()

openWindow

public void openWindow(String pagedesc,
                       String window,
                       String features,
                       Hashtable params)
Shows the specified page in the named window with the given parameters.
Parameters:
pagedesc - the page url.
window - the destination window.
features - a string representing the features.
params - a hashtable containing the parameters.
See Also:
AgpScriptHelper.closeWindow()

closeWindow

public void closeWindow()
Closes the current browser window.
Usage:

Generally, this should be used only for additionally opened windows.

See Also:
AgpScriptHelper.openWindow(String url, String window, String features), AgpScriptHelper.openWindow(String url, String window, String features, String query, String orderby), AgpScriptHelper.openWindow(String pagedesc, String window, String features, Hashtable params)

reloadFrame

public void reloadFrame(String frame)
Reloads the specified frame.
Parameters:
frame - a string specifying the frame to reload.
Example:

The following code fragment reloads the frame named "_left".

 	scriptHelper.reloadFrame("_left");
 
See Also:
AgpScriptHelper.reloadTopFrame()

reloadTopFrame

public void reloadTopFrame()
Reloads the toplevel frame.
See Also:
AgpScriptHelper.reloadFrame(String frame)

alert

public void alert(String msg)
Brings up an alert message prompt.
Parameters:
msg - the prompt string to display.
Example:

The following code fragment brings up a JavaScript dialog box.

 	agScriptHelper.alert("The input is invalid.  Please try again!");
 

SilverStream
Application Server 3.5