Business Components

oracle.jdeveloper.html
Class PickList

java.lang.Object
  |
  +--oracle.jdeveloper.html.HTMLFieldRendererImpl
        |
        +--oracle.jdeveloper.html.PickList

public class PickList
extends HTMLFieldRendererImpl

This class represents a databound picklist. It binds to data from a BC4J view object. It supports various renderings: combobox, listbox,radio group and checbox group.

Version:
PUBLIC

Field Summary
protected  HTMLForm aForm
           
protected  java.util.Hashtable allvalues
           
protected  boolean bAddNullEntry
           
protected  boolean bRemoveViewObject
           
protected  boolean bUseLineBreaks
           
protected  java.lang.String dataAttr
           
protected  java.lang.String labelAttr
           
protected  int nType
           
protected  RowSet qView
           
protected  java.lang.String sQuery
           
static int TYPE_CHECKBOX_GROUP
           
static int TYPE_COMBOBOX
           
static int TYPE_LISTBOX
           
static int TYPE_RADIO_GROUP
           
protected  java.util.Hashtable values
           
 
Fields inherited from class oracle.jdeveloper.html.HTMLFieldRendererImpl
nHeight, nLength, nWidth, sClass, sFormName, sName, sPrompt, sValue
 
Constructor Summary
PickList()
          Constructs object.
 
Method Summary
protected  HTMLElement generateCheckBoxGroup()
           
protected  HTMLElement generateComboBox()
           
protected  HTMLElement generateListBox()
           
protected  HTMLElement generateRadioGroup()
           
protected  java.lang.String getRenderedString()
           
protected  void initializeFromRenderingContext(HTMLRenderingContext ctx)
           
protected  void prepareForMutliValueListGeneration()
           
 java.lang.String renderToString(HTMLRenderingContext ctx, RowSet rs, Row row, java.lang.String sAttribute)
          This method is called when the field renderers are being used from the Tag library and from the DataWebBeans.
 void setAllowNulls(boolean bSet)
           
 void setDataSourceInfo(ApplicationModule appModule, java.lang.String sQuery, java.lang.String labelAttr, java.lang.String dataAttr)
          Defines the data source information for the picklist
 void setDataSourceInfo(RowSet qView, java.lang.String labelAttr, java.lang.String dataAttr)
          Defines the data source information for the picklist
 void setUseLineBreaks(boolean bUseBreaks)
           
 void useCheckBoxGroup()
          Tells picklist ot render as checkbox group.
 void useComboBox()
          Tells picklist to render as a combo box.
 void useListBox()
          Tells picklist to render as listbox
 void useRadioGroup()
          Tells picklist ot render as radio button group
 
Methods inherited from class oracle.jdeveloper.html.HTMLFieldRendererImpl
getCSSClassName, getDisplayHeight, getDisplayWidth, getFieldName, getFormName, getMaxDataLength, getPromptText, getValue, setCSSClassName, setDisplayHeight, setDisplayWidth, setFieldName, setFormName, setMaxDataLength, setPromptText, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_COMBOBOX

public static final int TYPE_COMBOBOX

TYPE_LISTBOX

public static final int TYPE_LISTBOX

TYPE_CHECKBOX_GROUP

public static final int TYPE_CHECKBOX_GROUP

TYPE_RADIO_GROUP

public static final int TYPE_RADIO_GROUP

nType

protected int nType

bAddNullEntry

protected boolean bAddNullEntry

sQuery

protected java.lang.String sQuery

aForm

protected HTMLForm aForm

qView

protected RowSet qView

labelAttr

protected java.lang.String labelAttr

dataAttr

protected java.lang.String dataAttr

values

protected java.util.Hashtable values

allvalues

protected java.util.Hashtable allvalues

bRemoveViewObject

protected boolean bRemoveViewObject

bUseLineBreaks

protected boolean bUseLineBreaks
Constructor Detail

PickList

public PickList()
Constructs object. Default rendering is combo box.
Method Detail

setAllowNulls

public void setAllowNulls(boolean bSet)

setUseLineBreaks

public void setUseLineBreaks(boolean bUseBreaks)

useComboBox

public void useComboBox()
Tells picklist to render as a combo box.

useListBox

public void useListBox()
Tells picklist to render as listbox

useRadioGroup

public void useRadioGroup()
Tells picklist ot render as radio button group

useCheckBoxGroup

public void useCheckBoxGroup()
Tells picklist ot render as checkbox group.

prepareForMutliValueListGeneration

protected void prepareForMutliValueListGeneration()

generateComboBox

protected HTMLElement generateComboBox()

generateListBox

protected HTMLElement generateListBox()

generateCheckBoxGroup

protected HTMLElement generateCheckBoxGroup()

generateRadioGroup

protected HTMLElement generateRadioGroup()

setDataSourceInfo

public void setDataSourceInfo(RowSet qView,
                              java.lang.String labelAttr,
                              java.lang.String dataAttr)
Defines the data source information for the picklist
Parameters:
qView - The View object this list is bound to
labelAttr - The name of the attribute that provides the label values
dataAttr - The name of the attribute that provides the data values

setDataSourceInfo

public void setDataSourceInfo(ApplicationModule appModule,
                              java.lang.String sQuery,
                              java.lang.String labelAttr,
                              java.lang.String dataAttr)
Defines the data source information for the picklist
Parameters:
appModule - The Application Module that is used to create the view object
sQuery - The SQL SELECT that retrieves the pciklist values or a ViewObject name
labelAttr - The name of the attribute that provides the label values
dataAttr - The name of the attribute that provides the data values

getRenderedString

protected java.lang.String getRenderedString()

initializeFromRenderingContext

protected void initializeFromRenderingContext(HTMLRenderingContext ctx)

renderToString

public java.lang.String renderToString(HTMLRenderingContext ctx,
                                       RowSet rs,
                                       Row row,
                                       java.lang.String sAttribute)
Description copied from interface: HTMLFieldRenderer
This method is called when the field renderers are being used from the Tag library and from the DataWebBeans.
Overrides:
renderToString in class HTMLFieldRendererImpl

Business Components