Decision Center API

ilog.webui.dhtml.components
Class IlxWDialog

java.lang.Object
  extended by ilog.webui.dhtml.IlxWContainer
      extended by ilog.webui.dhtml.IlxWComponent
          extended by ilog.webui.dhtml.components.IlxWDialog
All Implemented Interfaces:
ilog.webui.dhtml.IlxWConstants, ilog.webui.dhtml.IlxWCSSModelProvider, ilog.webui.dhtml.IlxWDependencyProvider, ilog.webui.dhtml.IlxWJSObject, Serializable
Direct Known Subclasses:
IlxWDialog.OKCancelDialog

public class IlxWDialog
extends IlxWComponent

Dialog window.

A dialog window is displayed as a new browser window. The content of the dialog is defined by adding components in the dialog pane, which you can get via getContentPane(). A dialog is a web component but cannot be add in a container as a standard component. It must be registered via its register method.

A dialog window will be shown when its action, returned by the getShowAction method, is performed.

In order to be notified when the dialog is closed, you can redefine the onClose method. For that, you must previously print the "closing notifier" on the parent window with the printWindowClosingNotifier method.

See Also:
Serialized Form

Nested Class Summary
static class IlxWDialog.OKCancelDialog
          Custom dialog box which displays 3 components: a body component.
 
Nested classes/interfaces inherited from class ilog.webui.dhtml.IlxWComponent
IlxWComponent.DynamicStyleMap
 
Field Summary
 
Fields inherited from class ilog.webui.dhtml.IlxWContainer
listenerList
 
Constructor Summary
IlxWDialog()
          Constructs a dialog.
 
Method Summary
 IlxWComponent add(IlxWComponent component)
          Redefined to forbid component to be added or removed after initialized.
 IlxWComponent add(IlxWComponent component, int index)
          Redefined to forbid component to be added or removed externally.
 ilog.webui.dhtml.components.IlxWPanel getContentPane()
          Get the content pane which will be displayed when this dialog is shown.
static IlxWDialog getRegisteredDialog(IlxWManager manager, String uniqueName)
          Gets the dialog previously registered in the manager.
 IlxWJSAction getShowAction()
          Return the JavaScript action to perform in order to show this dialog window.
protected  void onClose(IlxWPort port)
          Called when the dialog window is closed.
protected  void printComponent(IlxWPort port)
          Prints the HTML code that will display the graphical representation of this component.
 void printWindowClosingNotifier(IlxWPort port)
          Prints the notifier.
 void register(IlxWManager manager, String uniqueName)
          Registers a dialog box in the manager.
 void remove(IlxWComponent component)
          Redefined to forbid component to be added or removed externally.
 void requestClose()
          Request the window to be closed.
 void unregister()
          Unregisters a dialog box from the manager.
 
Methods inherited from class ilog.webui.dhtml.IlxWComponent
addPropertyChangeListener, addPropertyChangeListener, detach, doPrint, firePropertyChange, firePropertyChange, getName, getRealHtmlTagName, getStyle, invalidate, isInvalidated, notifyDependencies, print, removePropertyChangeListener, removePropertyChangeListener, setName, validate
 
Methods inherited from class ilog.webui.dhtml.IlxWContainer
getAttribute, getAttributeNames, getComponent, getComponentCount, getComponentNamed, getComponents, getManager, getParent, getUserAgentRules, indexOf, isAncestorOf, remove, removeAll, removeAttribute, setAttribute, setAuthorRules, setFinalizer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlxWDialog

public IlxWDialog()
Constructs a dialog.

Method Detail

printWindowClosingNotifier

public void printWindowClosingNotifier(IlxWPort port)
                                throws IOException
Prints the notifier.

This notifier can be printed on the parent window in order to tell the framework to call the onClose method once the dialog window is closed.

Throws:
IOException
Parameters:
port - The current port.
See Also:
onClose(ilog.webui.dhtml.IlxWPort)

onClose

protected void onClose(IlxWPort port)
Called when the dialog window is closed.

This method will be closed only if printWindowClosingNotifier has been already called on the parent window. This method does nothing by default.

See Also:
printWindowClosingNotifier(ilog.webui.dhtml.IlxWPort)

register

public void register(IlxWManager manager,
                     String uniqueName)
Registers a dialog box in the manager. This will add the dialog in the manager and set a name made of the given uniqueName.

See Also:
getRegisteredDialog(ilog.webui.dhtml.IlxWManager, java.lang.String), unregister()

getRegisteredDialog

public static IlxWDialog getRegisteredDialog(IlxWManager manager,
                                             String uniqueName)
Gets the dialog previously registered in the manager.

Parameters:
uniqueName - The name which has been previously passed to the register.
See Also:
register(ilog.webui.dhtml.IlxWManager, java.lang.String)

unregister

public void unregister()
Unregisters a dialog box from the manager.


add

public IlxWComponent add(IlxWComponent component)
Redefined to forbid component to be added or removed after initialized. Component must be added/removed externally via the ContentPane panel.

Overrides:
add in class IlxWContainer
Parameters:
component - The component to be added.
Returns:
The component passed as the argument.

add

public IlxWComponent add(IlxWComponent component,
                         int index)
Redefined to forbid component to be added or removed externally. Component must be added/removed externally via the ContentPane panel.

Overrides:
add in class IlxWContainer
Parameters:
component - The component to be added.
index - The position at which to insert the component.
Returns:
The component passed as the argument.

remove

public void remove(IlxWComponent component)
Redefined to forbid component to be added or removed externally. Component must be added/removed externally via the ContentPane panel.

Overrides:
remove in class IlxWContainer
Parameters:
component - The component to be removed.
See Also:
IlxWContainer.add(ilog.webui.dhtml.IlxWComponent)

getContentPane

public ilog.webui.dhtml.components.IlxWPanel getContentPane()
Get the content pane which will be displayed when this dialog is shown.


printComponent

protected void printComponent(IlxWPort port)
                       throws IOException
Description copied from class: IlxWComponent
Prints the HTML code that will display the graphical representation of this component. This method is called by the IlxWComponent.print(ilog.webui.dhtml.IlxWPort) method.

Specified by:
printComponent in class IlxWComponent
Throws:
IOException
Parameters:
port - The port on which the component will be printed.
See Also:
IlxWComponent.print(ilog.webui.dhtml.IlxWPort)

requestClose

public void requestClose()
Request the window to be closed. The next time a response is sent it will print a JavaScript statement which will make the window to close.


getShowAction

public IlxWJSAction getShowAction()
Return the JavaScript action to perform in order to show this dialog window.


Decision Center API

© Copyright IBM Corp. 1987, 2013