org.opencms.workplace.list
Class CmsTwoListsDialog

java.lang.Object
  extended by org.opencms.workplace.list.CmsTwoListsDialog
Direct Known Subclasses:
CmsTwoListsDialogsWOStart

public class CmsTwoListsDialog
extends Object

Helper class for managing two lists on the same dialog.

Since:
6.0.0
Version:
$Revision: 1.2 $
Author:
Michael Moossen

Constructor Summary
CmsTwoListsDialog(A_CmsListDialog wp1, A_CmsListDialog wp2)
          Default constructor.
 
Method Summary
protected  String defaultActionHtml()
          Generates the dialog starting html code.
protected  String defaultActionHtmlContent()
          Returns the html code for the default action content.
protected  String defaultActionHtmlEnd()
          Generates the dialog ending html code.
protected  String defaultActionHtmlStart()
          Generates the dialog starting html code.
 void displayDialog()
          Display method for two list dialogs.
 void displayDialog(boolean writeLater)
          Display method for two list dialogs, executes actions, but only displays if needed.
 A_CmsListDialog getActiveWp()
          Returns the workplace instance of the active list.
 A_CmsListDialog getFirstWp()
          Returns the workplace instance of the first list.
 A_CmsListDialog getPassiveWp()
          Returns the workplace instance of the passive list.
 A_CmsListDialog getSecondWp()
          Returns the workplace instance of the second list.
 void writeDialog()
          Writes the dialog html code, only if the CmsDialog.ACTION_DEFAULT is set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsTwoListsDialog

public CmsTwoListsDialog(A_CmsListDialog wp1,
                         A_CmsListDialog wp2)
Default constructor.

Parameters:
wp1 - the workplace instance for the first list
wp2 - the workplace instance for the second list
Method Detail

defaultActionHtml

protected String defaultActionHtml()
Generates the dialog starting html code.

Returns:
html code

defaultActionHtmlContent

protected String defaultActionHtmlContent()
Returns the html code for the default action content.

Returns:
html code

defaultActionHtmlEnd

protected String defaultActionHtmlEnd()
Generates the dialog ending html code.

Returns:
html code

defaultActionHtmlStart

protected String defaultActionHtmlStart()
Generates the dialog starting html code.

Returns:
html code

displayDialog

public void displayDialog()
                   throws JspException,
                          IOException,
                          ServletException
Display method for two list dialogs.

Throws:
JspException - if dialog actions fail
IOException - if writing to the JSP out fails, or in case of errros forwarding to the required result page
ServletException - in case of errros forwarding to the required result page

writeDialog

public void writeDialog()
                 throws IOException
Writes the dialog html code, only if the CmsDialog.ACTION_DEFAULT is set.

Throws:
IOException - if writing to the JSP out fails, or in case of errros forwarding to the required result page

displayDialog

public void displayDialog(boolean writeLater)
                   throws JspException,
                          IOException,
                          ServletException
Display method for two list dialogs, executes actions, but only displays if needed.

Parameters:
writeLater - if true no output is written, you have to call manually the defaultActionHtml() method.
Throws:
JspException - if dialog actions fail
IOException - if writing to the JSP out fails, or in case of errros forwarding to the required result page
ServletException - in case of errros forwarding to the required result page

getActiveWp

public A_CmsListDialog getActiveWp()
Returns the workplace instance of the active list.

Returns:
the workplace instance of the active list

getFirstWp

public A_CmsListDialog getFirstWp()
Returns the workplace instance of the first list.

Returns:
the workplace instance of the first list

getPassiveWp

public A_CmsListDialog getPassiveWp()
Returns the workplace instance of the passive list.

Returns:
the workplace instance of the passive list

getSecondWp

public A_CmsListDialog getSecondWp()
Returns the workplace instance of the second list.

Returns:
the workplace instance of the second list