com.tonbeller.wcf.form
Class ConfirmComponent

java.lang.Object
  extended bycom.tonbeller.wcf.component.ComponentSupport
      extended bycom.tonbeller.wcf.form.ConfirmComponent
All Implemented Interfaces:
Bookmarkable, Component, java.util.EventListener, Form, FormListener, javax.servlet.http.HttpSessionBindingListener, LifeCycle, Renderable, RequestListener, RoleExprHolder, Visible

public class ConfirmComponent
extends ComponentSupport

a simple yes/no query component


Field Summary
static java.lang.String BUNDLE
           
static java.lang.String SESSIONKEY
           
 
Fields inherited from interface com.tonbeller.wcf.bookmarks.Bookmarkable
EXTENSIONAL, INTENSIONAL
 
Constructor Summary
ConfirmComponent(java.lang.String id, Component parent, org.w3c.dom.Document document)
           
 
Method Summary
 void initialize(RequestContext context)
          called once when the component is created.
static ConfirmComponent instance()
           
 org.w3c.dom.Document render(RequestContext context)
          renders the component
 void show(java.lang.String title, java.lang.String text, RequestListener accept, RequestListener cancel)
          creates a simple yes/no form
 void show(java.lang.String title, java.lang.String text1, java.lang.String[] list, java.lang.String text2, RequestListener accept, RequestListener cancel)
          crates a yes/no dialog with a list
 void show(java.lang.String title, java.lang.String textA, java.lang.String[] listA, java.lang.String textB, java.lang.String[] listB, java.lang.String text, RequestListener accept, RequestListener cancel)
          crates a yes/no dialog with a list
 
Methods inherited from class com.tonbeller.wcf.component.ComponentSupport
addFormListener, destroy, getBookmarkState, getDispatcher, getForm, getId, getLocale, getNextView, getParent, getRoleExpr, isAutoValidate, isListeningTo, isVisible, removeFormListener, request, revert, setAutoValidate, setBookmarkState, setId, setNextView, setParent, setRoleExpr, setVisible, validate, valueBound, valueUnbound
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SESSIONKEY

public static final java.lang.String SESSIONKEY
See Also:
Constant Field Values

BUNDLE

public static final java.lang.String BUNDLE
See Also:
Constant Field Values
Constructor Detail

ConfirmComponent

public ConfirmComponent(java.lang.String id,
                        Component parent,
                        org.w3c.dom.Document document)
Method Detail

instance

public static ConfirmComponent instance()

initialize

public void initialize(RequestContext context)
                throws java.lang.Exception
Description copied from class: ComponentSupport
called once when the component is created. Sets the locale of this component. Called by the doEndTag of the ComponentTag, i.e. nested tags have been initialized.

Specified by:
initialize in interface LifeCycle
Overrides:
initialize in class ComponentSupport
Throws:
java.lang.Exception
See Also:
ComponentSupport.destroy(javax.servlet.http.HttpSession), ComponentSupport.valueBound(javax.servlet.http.HttpSessionBindingEvent), ComponentTag.doEndTag()

render

public org.w3c.dom.Document render(RequestContext context)
                            throws java.lang.Exception
Description copied from interface: Renderable
renders the component

Throws:
java.lang.Exception

show

public void show(java.lang.String title,
                 java.lang.String text,
                 RequestListener accept,
                 RequestListener cancel)
creates a simple yes/no form

Parameters:
title - title of the form
text - text of the body
accept - action for OK button or null
cancel - action for Cancel button or null

show

public void show(java.lang.String title,
                 java.lang.String text1,
                 java.lang.String[] list,
                 java.lang.String text2,
                 RequestListener accept,
                 RequestListener cancel)
crates a yes/no dialog with a list

Parameters:
title - title of the dialog
text1 - text before the list
list - the list items
text2 - text after the list
accept - action for OK button or null
cancel - action for Cancel button or null

show

public void show(java.lang.String title,
                 java.lang.String textA,
                 java.lang.String[] listA,
                 java.lang.String textB,
                 java.lang.String[] listB,
                 java.lang.String text,
                 RequestListener accept,
                 RequestListener cancel)
crates a yes/no dialog with a list

Parameters:
title - title of the dialog
textA - text before list A
listA - the first group of list items
textB - text before list B
listB - the second group of list items
text - text after the list
accept - action for OK button or null
cancel - action for Cancel button or null