butler.client.record
Class DRecordLookup

java.lang.Object
  extended by butler.client.record.DRecordSelector
      extended by butler.client.record.DRecordLookup

public class DRecordLookup
extends DRecordSelector

Selector that uses a text field if the primary key has only one column or otherwise a table for entering key values. There are also a lookup-button that launces a selection panel.

Author:
Fredrik Bertilsson

Field Summary
 
Fields inherited from class butler.client.record.DRecordSelector
_multipleMode, _query, _table
 
Constructor Summary
DRecordLookup(Table tab)
           
 
Method Summary
 java.lang.String getCaption()
           
 java.util.List getColumns()
           
 Datatype getDatatype(Column col)
           
 RecordFormatter getFormatter()
           
 DListForm getSelectionPanel()
           
 boolean getShowHeader()
           
 void setColumn(Column col)
          Sets the column to be entered in the text field.
 void setColumns(java.util.List cols)
           
 void setDatatype(Column col, Datatype dt)
           
 void setFormatter(RecordFormatter formatter)
           
 void setSelectionPanel(DListForm sp)
          Sets the selection panel to be used.
 void setShowHeader(boolean flag)
           
 void toXML(org.xml.sax.ContentHandler handler)
           
 
Methods inherited from class butler.client.record.DRecordSelector
getQuery, getTable, isEnabled, isMultipleMode, isNewMode, parse, setEnabled, setMultipleMode, setNewMode, setTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DRecordLookup

public DRecordLookup(Table tab)
Method Detail

setColumn

public void setColumn(Column col)
               throws java.lang.Exception
Sets the column to be entered in the text field. There has to be a unique index on this column. If this method is not called, the primary key will be used.

Throws:
java.lang.Exception

getColumns

public java.util.List getColumns()
                          throws java.lang.Exception
Throws:
java.lang.Exception

setColumns

public void setColumns(java.util.List cols)

getShowHeader

public boolean getShowHeader()

setShowHeader

public void setShowHeader(boolean flag)

getDatatype

public Datatype getDatatype(Column col)
                     throws java.lang.Exception
Throws:
java.lang.Exception

setDatatype

public void setDatatype(Column col,
                        Datatype dt)
Overrides:
setDatatype in class DRecordSelector

getSelectionPanel

public DListForm getSelectionPanel()
                            throws java.lang.Exception
Throws:
java.lang.Exception

setSelectionPanel

public void setSelectionPanel(DListForm sp)
Sets the selection panel to be used. If this method is not called, a selection panel will be created automatically.


getCaption

public java.lang.String getCaption()
                            throws java.lang.Exception
Overrides:
getCaption in class DRecordSelector
Throws:
java.lang.Exception

setFormatter

public void setFormatter(RecordFormatter formatter)
                  throws java.lang.Exception
Throws:
java.lang.Exception

getFormatter

public RecordFormatter getFormatter()

toXML

public void toXML(org.xml.sax.ContentHandler handler)
           throws java.lang.Exception
Overrides:
toXML in class DRecordSelector
Throws:
java.lang.Exception