com.cc.framework.ui.painter.html
Class HtmlTextListPainter

java.lang.Object
  extended bycom.cc.framework.ui.painter.ControlPainter
      extended bycom.cc.framework.ui.painter.html.HtmlPainterBase
          extended bycom.cc.framework.ui.painter.html.HtmlTextListPainter

public class HtmlTextListPainter
extends HtmlPainterBase

Painter for the TextList Control

Since:
1.7
Author:
P001002

Field Summary
 
Fields inherited from class com.cc.framework.ui.painter.ControlPainter
log
 
Constructor Summary
HtmlTextListPainter(PainterContext painterContext, TextListControl ctrl)
          Constructor
 
Method Summary
protected  org.apache.ecs.html.Table createButtonTable(java.util.Collection buttons)
           
protected  org.apache.ecs.ConcreteElement doCreateAddButton(boolean enabled)
          Creates the Add-Button
protected  java.util.Collection doCreateButtons()
          Creates the buttons for the list elements
protected  org.apache.ecs.ConcreteElement doCreateDisplayElement()
          Creates the element for display only.
protected  org.apache.ecs.ConcreteElement doCreateEditElement()
          Creates the element for display only.
protected  org.apache.ecs.ConcreteElement doCreateEditField()
           
protected  org.apache.ecs.ConcreteElement doCreateElement()
          Creates the HTML-Element.
protected  org.apache.ecs.ElementContainer doCreateHiddenFields(java.lang.Object[] values)
          This method creates all the hidden fields that are necessary to synchronize the selected values back to the server
protected  org.apache.ecs.ConcreteElement doCreateMoveDownButton(boolean enabled)
          Creates the MoveDown-Button
protected  org.apache.ecs.ConcreteElement doCreateMoveUpButton(boolean enabled)
          Creates the MoveUp-Button
protected  org.apache.ecs.ConcreteElement doCreateRemoveButton(boolean enabled)
          Creates the Remove-Button
protected  JavaScript doCreateScript()
          Creates the Java Script Code which is needed by the control
protected  org.apache.ecs.ConcreteElement doCreateSelectElement(java.lang.Object[] values)
           
protected  TextListControl getCtrl()
          Retrieves the control for this painter
protected  java.lang.Object[] getValues()
          Retrieves the value for the text control in form of a String
 
Methods inherited from class com.cc.framework.ui.painter.ControlPainter
ajaxPaint, attr, attr, attr, beginPaint, createActionPainter, createActionPainter, createElement, createImage, createImage, createImage, createInput, createInput, createSpacer, createSpacer, createSpacer, decorateURL, doAddDecorationsToRow, doAddDecorationsToRow, doAfterCreate, doAttachDecorations, doBeforeCreate, encodeURL, endPaint, forceControlName, getAsString, getAwtColor, getColor, getContextPath, getControlName, getDecorationsOnce, getElementClass, getElementName, getFramePainter, getFrameworkString, getFrameworkString, getImage, getImage, getImage, getImageSrc, getImageSrc, getImageSrc, getLocale, getPageContext, getPainterContext, getPrincipal, getRequest, getResponse, getSession, getSmartCaption, getSmartDetail, getSource, getSource, getStringResource, getStyleId, html, html, html, init, isRunAtClient, localize, localize, localize, paint, removeHtml, removeHtml, request, response, session, showComments
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HtmlTextListPainter

public HtmlTextListPainter(PainterContext painterContext,
                           TextListControl ctrl)
Constructor

Parameters:
painterContext - The PainterContext
ctrl - The Control to render
Method Detail

getCtrl

protected TextListControl getCtrl()
Retrieves the control for this painter

Returns:
Control

createButtonTable

protected org.apache.ecs.html.Table createButtonTable(java.util.Collection buttons)

doCreateDisplayElement

protected org.apache.ecs.ConcreteElement doCreateDisplayElement()
Creates the element for display only.

Returns:
HTML Element

doCreateHiddenFields

protected org.apache.ecs.ElementContainer doCreateHiddenFields(java.lang.Object[] values)
This method creates all the hidden fields that are necessary to synchronize the selected values back to the server

Parameters:
values - array with the selected values
Returns:
Collection of hidden fields

doCreateEditField

protected org.apache.ecs.ConcreteElement doCreateEditField()

doCreateSelectElement

protected org.apache.ecs.ConcreteElement doCreateSelectElement(java.lang.Object[] values)

doCreateAddButton

protected org.apache.ecs.ConcreteElement doCreateAddButton(boolean enabled)
Creates the Add-Button

Parameters:
enabled -
Returns:
ConcreteElement

doCreateMoveUpButton

protected org.apache.ecs.ConcreteElement doCreateMoveUpButton(boolean enabled)
Creates the MoveUp-Button

Parameters:
enabled -
Returns:
ConcreteElement

doCreateMoveDownButton

protected org.apache.ecs.ConcreteElement doCreateMoveDownButton(boolean enabled)
Creates the MoveDown-Button

Parameters:
enabled -
Returns:
ConcreteElement

doCreateRemoveButton

protected org.apache.ecs.ConcreteElement doCreateRemoveButton(boolean enabled)
Creates the Remove-Button

Parameters:
enabled -
Returns:
ConcreteElement

doCreateButtons

protected java.util.Collection doCreateButtons()
Creates the buttons for the list elements

Returns:
collection of ConcreteElement Items

doCreateEditElement

protected org.apache.ecs.ConcreteElement doCreateEditElement()
Creates the element for display only.
   +-----------------------------+-------+-------------+
   |  input element              |  add  | decorations |
   +-----------------------------+-------+-------------+
   |  select (multiple) element  |+-----+|             |
   |                             || up  ||             |
   |                             || down||             |
   |                             || del ||             |
   |                             |+-----+|             |
   +-----------------------------+-------+-------------+
   
   <hidden (1)><hidden (2)>...<hidden (n)>
 

Returns:
HTML Element

doCreateElement

protected org.apache.ecs.ConcreteElement doCreateElement()
Description copied from class: ControlPainter
Creates the HTML-Element. This Method must be implemented by the concrete Sub-Class

Specified by:
doCreateElement in class ControlPainter
Returns:
ConcreteElement
See Also:
ControlPainter.doCreateElement()

getValues

protected java.lang.Object[] getValues()
Retrieves the value for the text control in form of a String

Returns:
value as String

doCreateScript

protected JavaScript doCreateScript()
Creates the Java Script Code which is needed by the control

Returns:
Java Script Code


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.