butler.client.form
Class DListForm

java.lang.Object
  extended by butler.client.form.DForm
      extended by butler.client.form.DListForm

public class DListForm
extends DForm

A form containing a query panel on top and below a record list table that shows the search result. The table can be used for editing and creating records. If a detail form is supplied, that form will be used for editing single record when they are selected.

Author:
Fredrik Bertilsson
See Also:
Forms DTD

Nested Class Summary
 
Nested classes/interfaces inherited from class butler.client.form.DForm
DForm.Parser
 
Constructor Summary
DListForm()
           
DListForm(Table tab)
          Constructs a list form descriptor using the given table.
 
Method Summary
 DDetailForm createDetailForm()
          Creates a detail form to use when a record is selected.
 java.util.Collection getChildren()
           
 DDetailForm getDetailForm()
          Returns the detail form (if exists) used when a record is selected.
 DQueryPanel getQueryPanel()
           
 DRecordListTable getRecordListTable()
          Returns a reference to the record list table used in this list form.
 Table getTable()
           
 boolean isInitSearch()
           
 boolean isMultipleSelection()
           
 boolean isPaging()
           
 boolean isQueryPanelVisible()
           
 boolean isSelectionMode()
          Tells if this list form is used for selecting records.
static DListForm parse(org.dom4j.Element element)
           
 void setInitSearch(boolean initSearch)
           
 void setMultipleSelection(boolean flag)
          Sets wheter multiple selection in the record list should be allowed or not.
 void setPaging(boolean flag)
          Sets if paging should be used.
 void setQuery(Query q)
          Sets the query that will be used to build the query panel.
 void setQueryPanel(DQueryPanel panel)
          Sets the query panel for this list form.
 void setQueryPanelVisible(boolean queryPanelVisible)
           
 void setRecordListTable(DRecordListTable recListTable)
           
 void setSelectionMode(boolean flag)
           
 void toXML(org.xml.sax.ContentHandler handler)
           
 
Methods inherited from class butler.client.form.DForm
addAction, addMenu, createMenuItem, getAction, getActions, getCaption, getChildFormId, getHelp, getId, getMenuList, getNativeInfo, getParent, getSiblingFormId, getStatusBar, getTitle, parseForm, parseForm, registerParser, setCaption, setCaption, setHelp, setHelp, setId, setNativeInfo, setParent, setStatusBar, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DListForm

public DListForm()

DListForm

public DListForm(Table tab)
          throws java.lang.Exception
Constructs a list form descriptor using the given table.

Throws:
java.lang.Exception
Method Detail

getTable

public Table getTable()

setRecordListTable

public void setRecordListTable(DRecordListTable recListTable)

getRecordListTable

public DRecordListTable getRecordListTable()
                                    throws java.lang.Exception
Returns a reference to the record list table used in this list form.

Throws:
java.lang.Exception

setQuery

public void setQuery(Query q)
              throws java.lang.Exception
Sets the query that will be used to build the query panel. If this method is called, the method setQueryPanel don't need to be called. If no query or query panel is supplied, a query using the primary key columns in constructed.

Throws:
java.lang.Exception

setQueryPanel

public void setQueryPanel(DQueryPanel panel)
Sets the query panel for this list form.


getQueryPanel

public DQueryPanel getQueryPanel()
                          throws java.lang.Exception
Throws:
java.lang.Exception

setMultipleSelection

public void setMultipleSelection(boolean flag)
                          throws java.lang.Exception
Sets wheter multiple selection in the record list should be allowed or not.

Throws:
java.lang.Exception

isMultipleSelection

public boolean isMultipleSelection()
                            throws java.lang.Exception
Throws:
java.lang.Exception

isSelectionMode

public boolean isSelectionMode()
Tells if this list form is used for selecting records.


setSelectionMode

public void setSelectionMode(boolean flag)

isPaging

public boolean isPaging()

setPaging

public void setPaging(boolean flag)
Sets if paging should be used. If paging is used, a limited number of records will be showed in the record list table. To get the next block of records, the "next" button has to be pressed.


getDetailForm

public DDetailForm getDetailForm()
Returns the detail form (if exists) used when a record is selected.


createDetailForm

public DDetailForm createDetailForm()
                             throws java.lang.Exception
Creates a detail form to use when a record is selected.

Throws:
java.lang.Exception

parse

public static DListForm parse(org.dom4j.Element element)
                       throws java.lang.Exception
Throws:
java.lang.Exception

toXML

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

isQueryPanelVisible

public boolean isQueryPanelVisible()

setQueryPanelVisible

public void setQueryPanelVisible(boolean queryPanelVisible)

isInitSearch

public boolean isInitSearch()

setInitSearch

public void setInitSearch(boolean initSearch)

getChildren

public java.util.Collection getChildren()
                                 throws java.lang.Exception
Overrides:
getChildren in class DForm
Throws:
java.lang.Exception