JAC project
AOPSYS
CEDRIC & LIP6 labs

org.objectweb.jac.aspects.gui.web
Class Dialog

java.lang.Object
  |
  +--org.objectweb.jac.aspects.gui.web.AbstractView
        |
        +--org.objectweb.jac.aspects.gui.web.AbstractPage
              |
              +--org.objectweb.jac.aspects.gui.web.Dialog
All Implemented Interfaces:
DialogListener, DialogView, HTMLViewer, View, ViewIdentity

public class Dialog
extends AbstractPage
implements DialogView, DialogListener

An HTML page containing a View, and an OK and a close Button


Field Summary
 
Fields inherited from class org.objectweb.jac.aspects.gui.web.AbstractPage
view
 
Fields inherited from class org.objectweb.jac.aspects.gui.web.AbstractView
column, context, description, height, isCellViewer, label, parentView, row, table, width
 
Constructor Summary
Dialog(View view, Object parent, String title, String description)
           
 
Method Summary
 void genBody(PrintWriter out)
          Override this method to generate the body of an HTML page.
 View getContentView()
          Returns the content view of the dialog
 JacRequest getRequest()
           
 HttpServletResponse getResponse()
           
 void onCancel()
          Called when the Cancel button was pressed by the user
 void onOK(JacRequest request)
          Called when the OK button was pressed by the user
 void onValidate(JacRequest request)
          Validates inputs, but creates no HTML.
 void restoreContext()
          Restore context attributes stored at creation time
 boolean waitForClose()
          Waits until the dialog is closed or timeout iccurs.
 
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractPage
close, genHTML
 
Methods inherited from class org.objectweb.jac.aspects.gui.web.AbstractView
equals, eventURL, eventURL, genPage, genStyleSheets, getCloseBorder, getContext, getDescription, getFactory, getId, getId, getLabel, getMessage, getOpenBorder, getParameters, getParentView, getRootView, getStyle, getType, getViewBorder, hashCode, iconElement, iconElement, isClosed, isDescendantOf, isInForm, printAttributes, setAttribute, setColumn, setContext, setDescription, setFactory, setFocus, setHeight, setLabel, setMessage, setParameters, setParentView, setRow, setStyle, setStyleSheet, setTable, setType, setViewBorder, setWidth, validate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jac.aspects.gui.View
close, getContext, getDescription, getFactory, getLabel, getMessage, getParentView, getRootView, getStyle, getViewBorder, isClosed, isDescendantOf, setContext, setDescription, setFactory, setFocus, setHeight, setLabel, setMessage, setParentView, setStyle, setViewBorder, setWidth, validate
 
Methods inherited from interface org.objectweb.jac.aspects.gui.ViewIdentity
getParameters, getType, setParameters, setType
 
Methods inherited from interface org.objectweb.jac.aspects.gui.web.HTMLViewer
setStyleSheet
 

Constructor Detail

Dialog

public Dialog(View view,
              Object parent,
              String title,
              String description)
Parameters:
view - the view to embed in the dialog
parent - the parent window of the dialog
title - the title
description - description of the view
Method Detail

getResponse

public HttpServletResponse getResponse()

getRequest

public JacRequest getRequest()

waitForClose

public boolean waitForClose()
                     throws TimeoutException
Description copied from interface: DialogView
Waits until the dialog is closed or timeout iccurs.

Specified by:
waitForClose in interface DialogView
Returns:
true if the dialog was validated with the OK button by the user, false otherwise
TimeoutException

getContentView

public View getContentView()
Description copied from interface: DialogView
Returns the content view of the dialog

Specified by:
getContentView in interface DialogView

genBody

public void genBody(PrintWriter out)
             throws IOException
Description copied from class: AbstractView
Override this method to generate the body of an HTML page.

Overrides:
genBody in class AbstractView
IOException
See Also:
AbstractView.genPage(PrintWriter)

restoreContext

public void restoreContext()
Description copied from interface: DialogListener
Restore context attributes stored at creation time

Specified by:
restoreContext in interface DialogListener

onOK

public void onOK(JacRequest request)
Description copied from interface: DialogListener
Called when the OK button was pressed by the user

Specified by:
onOK in interface DialogListener
Parameters:
request - the servlet request

onValidate

public void onValidate(JacRequest request)
Description copied from interface: DialogListener
Validates inputs, but creates no HTML.

Specified by:
onValidate in interface DialogListener

onCancel

public void onCancel()
Description copied from interface: DialogListener
Called when the Cancel button was pressed by the user

Specified by:
onCancel in interface DialogListener

Contact JAC development team:
Renaud Pawlak
Lionel Seinturier
Laurent Martelli