www.element4solution.com

e4s.html.editing
Class E4EditingElement

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.html.E4HtmlObject
          extended by e4s.html.E4HtmlElementGeneral
              extended by e4s.html.E4HtmlElement
                  extended by e4s.html.editing.E4EditingElement
All Implemented Interfaces:
E4HtmlElement_Intf, E4SessionObject_Intf

public class E4EditingElement
extends E4HtmlElement
implements E4SessionObject_Intf

Element that can be used to display values out of an database table and modify values. Supports changing of sorting columns, layout definitions, next/previous page, search capabilities, adding/modify/delete records. Used within E4EditingFrameset.

First, start to define a frameset using E4EditingFrameset. The frameset contains the E4EditingElement. Some general settings are defined in the property file, using E4EditingSettings to retrieve them.

When data is displayed out of a database table (using the interface E4DBSelect_Intf, then it will be displayed using some kind of a table view. Either the data will be displayed as it is contained in the database table, or you can use a Formatter (E4EditingFormatter_Intf to distinct between what will be displayed and what is the real data (e.g. real data = "N", "W", "S", "E" but display will be "North", "West", ..). When performing a search, this will be treatened vice versa and the user gets a combo-box selecting "North", "West", .. but the database query results in "N", "W". A Formatter is optional.

The functionality is covered in modules E4ModuleEditingHandling01 and E4ModuleEditingHandling02. The first module contains more or less frame handling and list handling, including searching. The second module contains functionality for modifying records. It is not required to use this functionality of the second module, either because it is not needed or it will be overwritten by your own functions. If the module is used, then you can make use of the AEP (AEP_EditingDataDescriptor_Intf - Application Exit Point) to become involved before or after an operation such as deleting or inserting. The E4EditingDataDescriptor can be used, to define if any and which functions (@link e4s.html.E4Method) shall be involved on editing functionality. Those gives you the flexibility to use your own functions. If you use your own functions, the AEP_EditingDataDescriptor_Intf will have no effect. Both, AEP_EditingDataDescriptor_Intf and E4EditingDataDescriptor are optional. The E4EditingDataDescriptor defines more functionality, such as default values or main index fields - but never any layout issues.

The {e4s.html.editing.E4EditingDefinitionDataField} is more or less an internal used class, it is used to hold information about display (layouted) columns and database columns, including label definitions and visibility definitions. These values can be set using the environment at runtime, and they will be stored on the local file system using E4EditingPersistance.

Since:
JDK 1.4
See Also:
E4EditingFrameset.getEditingElement(), E4ModuleEditingHandling01, E4ModuleEditingHandling02, E4EditingSettings, AEP_EditingDataDescriptor_Intf, AEP_UserDefFunction_Intf, e4s.html.editing.EditingDefinition_Intf, E4EditingDataDescriptor, E4SubEditingBODY, E4DBSelect_Intf,

Example_Editing_01.java


Nested Class Summary
static class E4EditingElement.E4EditingElementAdditionalButton
           
static class E4EditingElement.E4EditingElementOnlyEditing
          Covers parameters and the editing mode that enable to use ONLY the editing frameset, without having any navigation frames or selection table.
 
Field Summary
static E4Color DEFAULT_TOOLBAR_COLOR
           
static java.lang.String JS_NAME_DELETE
          Name of the Java-Script used for editing (add, modify) a database record.
static java.lang.String JS_NAME_DUPLICATE
          Name of the Java-Script used for duplicating a database record.
static java.lang.String JS_NAME_EDIT
          Name of the Java-Script used for editing (add, modify) a database record.
static java.lang.String JS_NAME_USERDEF
          Name of the Java-Script used for editing (add, modify) a database record.
static int MAX_BLOCK_LENGTH
          The maximum block length.
 
Fields inherited from class e4s.html.E4HtmlElementGeneral
m_elements, m_needed_scripts
 
Fields inherited from class e4s.html.E4HtmlObject
m_parent_e4sID
 
Fields inherited from class e4s.util.E4Object
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET
 
Constructor Summary
E4EditingElement(java.lang.String persistantObjId, E4ServletImplementation_Intf servlet)
           
E4EditingElement(java.lang.String persistantObjId, E4ServletImplementation_Intf servlet, E4EditingDataDescriptor descriptor)
           
 
Method Summary
 void addAdditionalButton(E4EditingElement.E4EditingElementAdditionalButton a)
           
 void addAdditionalButton(E4Method mref, IMG image, java.lang.String alt)
           
 void addAdditionalParameters(E4CgiParams params, E4ServletImplementation_Intf servlet)
          When the sort (or similar other functions) are called, pass those parameters to the called method.
 long calculateRowCount()
           
 boolean canHaveFreeFields()
           
 void collectScripts(E4ScriptsVec v, E4ServletImplementation_Intf servlet)
          Append the current script to the Vector, each script is identified by a name and can only appear onece in the Vector.
 void collectTranslationsForEditing(E4TranslationsVec v, E4ServletImplementation_Intf servlet)
          Build a list (Vector) with translation texts used so far during display of this page.
 int countColumns()
           
 E4Fieldset create_search_FIELDSET(FORM form, E4CgiParams additional, E4ApplObj_Intf applobj)
           
 E4Fieldset createFIELDSET(FORM form, E4DBColumnInfo[] cols)
           
 E4ID E4ID()
          Get the E4ID of the object.
 void enableLayoutProperties(boolean mode)
          Disable the layout properties (show all columns with their default names as labels).
 E4EditingDefinitionDataField findDataField(E4DBColumnInfo cInfo)
           
 E4EditingDefinitionDataField findDataField(E4DBColumnName cName)
           
 E4EditingFormatter_Intf findFormatter(java.lang.Class clazz)
           
 E4EditingFormatter_Intf findFormatter(E4DBColumnName cName)
           
 E4EditingFormatter_Intf findFormatter(java.lang.String classname)
           
 E4Method getActionSearch()
           
 E4Method getActionSearchReset()
           
 int getActualBlock()
          Get the current (actual) block.
 E4EditingElement.E4EditingElementAdditionalButton[] getAdditionalButtons()
           
 E4CgiParams getAdditionalParameters()
           
 E4Label_Intf getCaptionText()
           
 E4Color getColor_ListBorder()
           
 E4Color getColor_ResizeArea()
           
 E4Color getColor_ToolbarBackground()
           
 E4Color getColor_ToolbarCaption()
           
 E4EditingDataDescriptor getDataDescriptor()
           
 int getDisplayBlockLength()
          Get definition for the display block length.
 boolean getDisplayIndex()
          Get the state for the display of an index table (one entry for each page).
 boolean getDisplayRowCounter()
          Get the state for display of a row-counter.
 E4EditingPersistance.TableLayout getEditingColumns()
          Get the editing columns defined.
 E4EditingElement.E4EditingElementOnlyEditing getEditingOnly()
          This medthod disables the selection and the navigation and just opens one editing area
 E4DBSelect_Intf getEditingSelection()
          Get the fundamental object that is responsible for the selection.
 int getFirstBlock()
          Get the first block.
 java.util.Enumeration getFormatter()
           
 IMG getImageAdd(boolean active)
           
 IMG getImageCancel(boolean active)
           
 IMG getImageLast(boolean active)
           
 IMG getImageNext(boolean active)
           
 IMG getImagePrev(boolean active)
           
 IMG getImageReload(boolean active)
           
 IMG getImageSave(boolean active)
           
 IMG getImageSearch(boolean active)
           
 IMG getImageSearchReset(boolean active)
           
 IMG getImageSettings()
           
 IMG getImageStart(boolean active)
           
 boolean getIncludeFreefieldsInSearch()
           
 E4JavaScript getJsCancel()
           
 E4JavaScript getJsSave()
           
 Language getLanguage()
           
 int getLastBlock()
          Get the last available block.
 E4SortedList getList()
          Get the current E4SortedList element that was initially created when the object was created and changed by every #readBlock().
 E4Method getMethodAdd()
          Get the method defined to add a record.
 E4Method getMethodDelete()
          Get the method defined to delete a record.
 E4Method getMethodEdit()
          Get the method defined to edit a record.
 int[] getNumRows4Display()
           
 java.lang.String getObjectID()
          Get the ID of the Object, used for object persistance.
 E4DBTableName getTableName()
           
 int getTranslationType()
           
 java.lang.String getXmlLayoutFile()
          Get the name for the XML descriptor file.
 boolean hasUserdefinedFunctions()
          Determine, if userdefined functions are declared within the E4EditingDataDescriptor.
 void initDisplayBlockLength()
           
 boolean isAjax()
           
 boolean isDataAvailable()
          Is data available based on the latest query?
 boolean isFilterDefined()
           
 boolean isFramesetVertical()
          Get the frameset layout of this editing element.
 void paintIndex(BODY body, E4EventHandlerA moveSpecified)
          Get the state for the display of an index table (one entry for each page).
 boolean readBlock(E4ServletImplementation_Intf servlet)
          Read the current block.
 void resetFormatter()
           
 void resetSearchFilter()
          Resets any predefined search criteria.
 void setActionSearch(E4Method mref)
           
 void setActionSearchReset(E4Method mref)
           
 void setActionSort(E4Method mref, E4ServletImplementation_Intf servlet)
           
 void setActualBlock(int block)
          Set the current (actual) block.
 void setCaptionText(E4Label_Intf text)
           
 void setCaptionText(java.lang.String text)
           
 void setColor_ListBorder(E4Color color)
           
 void setColor_ResizeArea(E4Color color)
           
 void setColor_ToolbarBackground(E4Color color)
           
 void setColor_ToolbarCaption(E4Color color)
           
 void setDataDescriptor(E4EditingDataDescriptor descriptor)
           
 void setDisplayBlockLength(int length)
          Set the block length for display.
 void setDisplayIndex(boolean mode)
          Enables the display of an index table (one entry for each page).
 void setDisplayRowCounter(boolean mode)
          Enables the display of a row-counter.
 void setEditingColumns(java.util.Vector vec)
          Set the editing columns defined.
 void setEditingOnly(E4EditingElement.E4EditingElementOnlyEditing params)
          This medthod disables the selection and the navigation and just opens one editing area
 void setEditingSelection(E4DBSelect_Intf selector)
          Sets the selection object, that is the object that contains data and enables filtering and sorting.
 void setFormatter(E4EditingFormatter_Intf formatter)
           
 void setFramesetVertical(boolean mode)
          Set the frameset layout of this editing element.
 void setImageAdd(IMG add, boolean active)
           
 void setImageCancel(IMG cancel, boolean active)
           
 void setImageLast(IMG last, boolean active)
           
 void setImageNext(IMG next, boolean active)
           
 void setImagePrev(IMG prev, boolean active)
           
 void setImageReload(IMG reload, boolean active)
           
 void setImageSave(IMG save, boolean active)
           
 void setImageSearch(IMG search, boolean active)
           
 void setImageSearchReset(IMG search_reset, boolean active)
           
 void setImageSettings(IMG settings)
           
 void setImageStart(IMG start, boolean active)
           
 void setIncludeFreefieldsInSearch(boolean include_freefields)
           
 void setJsCanBranch(java.lang.String js_name_can_branch)
           
 void setNumRows4Display(int[] numrows)
           
 void setSearchFilter(E4CgiParams params, E4ApplObj_Intf applobj)
          Handling of search parameters used to define or rebuild a filter criteria.
 void setSearchFilter2(E4ApplObj_Intf applobj)
          Rebuild a filter criteria defined previous.
 void setTranslationType(int translation_type)
           
 void setXmlLayoutFile(java.lang.String filename)
          Optionally, sets the name for the XML descriptor file.
 void sortBy(E4DBColumnName column, boolean descending)
          Set the sort column of the selection object.
 void toHtml(E4StringBufferHtml buf, E4CgiParams params, E4ServletImplementation_Intf servlet)
           
 void toHtml(E4StringBufferHtml buf, E4ServletImplementation_Intf servlet)
          Create the HTML output for this element.
 java.lang.String toString()
           
 void useAjax(boolean mode)
           
 boolean useLayoutProperties()
          Get the state of the layout properties.
 
Methods inherited from class e4s.html.E4HtmlElement
_getSVNVersionString, addElement, addElement, addElement, copyElements, print
 
Methods inherited from class e4s.html.E4HtmlElementGeneral
addScript, addScript, addScript, addStyleForEditing, addTranslationForEditing, buildStyleAttribute, buildStyleClassReference, collectStylesForEditing, collectStylesForEditing, collectStylesForEditing, collectTranslationsForEditing, createScript, createScript, debugToString, findElement, findElement, findElement, findElement, getElements, getElementsVec, getField, getId, getLastElement, getStringContent, getStyle, getSTYLE, getStyle, hasScripts, hasSTYLE, isContentClass, isE4InputField_Intf, openTag, removeAll, removeElementById, removeElements, removeElements, removeStyle, setId, setReadOnly, setStyle, setStyle, setSTYLE, setValue, Style, Style, toHtml_hidden, validate
 
Methods inherited from class e4s.html.E4HtmlObject
E4ID, set_e4sID
 
Methods inherited from class e4s.util.E4Object
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface e4s.html.E4HtmlElement_Intf
addScript, addScript, addScript, collectStylesForEditing, debugToString, findElement, findElement, getElements, getElementsVec, getField, getId, getStringContent, isContentClass, removeAll, removeElementById, removeElements, set_e4sID, setId, setReadOnly, setValue, toHtml_hidden, validate
 

Field Detail

DEFAULT_TOOLBAR_COLOR

public static final E4Color DEFAULT_TOOLBAR_COLOR

MAX_BLOCK_LENGTH

public static final int MAX_BLOCK_LENGTH
The maximum block length.

See Also:
setDisplayBlockLength(int), Constant Field Values

JS_NAME_EDIT

public static final java.lang.String JS_NAME_EDIT
Name of the Java-Script used for editing (add, modify) a database record. This calles the associated function.

See Also:
JS_NAME_DELETE, e4s.html.application.sysmodule.E4ModuleEditingHandling02#editRecord(e4s.html.HTML,e4s.html.E4CgiParams), e4s.html.application.sysmodule.E4ModuleEditingHandling02#addRecord(e4s.html.HTML,e4s.html.E4CgiParams), Constant Field Values

JS_NAME_DELETE

public static final java.lang.String JS_NAME_DELETE
Name of the Java-Script used for editing (add, modify) a database record. This calles the associated function.

See Also:
JS_NAME_EDIT, e4s.html.application.sysmodule.E4ModuleEditingHandling02#deleteRecord(e4s.html.HTML,e4s.html.E4CgiParams), Constant Field Values

JS_NAME_DUPLICATE

public static final java.lang.String JS_NAME_DUPLICATE
Name of the Java-Script used for duplicating a database record. This calles the associated function.

See Also:
JS_NAME_EDIT, e4s.html.application.sysmodule.E4ModuleEditingHandling02#duplicateRecord(e4s.html.HTML,e4s.html.E4CgiParams), Constant Field Values

JS_NAME_USERDEF

public static final java.lang.String JS_NAME_USERDEF
Name of the Java-Script used for editing (add, modify) a database record. This calles the associated function.

See Also:
JS_NAME_EDIT, E4EditingDataDescriptor.setUserDefMethod(e4s.html.E4Method, e4s.html.IMG, java.lang.String), Constant Field Values
Constructor Detail

E4EditingElement

public E4EditingElement(java.lang.String persistantObjId,
                        E4ServletImplementation_Intf servlet,
                        E4EditingDataDescriptor descriptor)

E4EditingElement

public E4EditingElement(java.lang.String persistantObjId,
                        E4ServletImplementation_Intf servlet)
Method Detail

useAjax

public void useAjax(boolean mode)

isAjax

public boolean isAjax()

getEditingSelection

public E4DBSelect_Intf getEditingSelection()
Get the fundamental object that is responsible for the selection.

Returns:
the selection object
See Also:
#setEditingSelection()

sortBy

public void sortBy(E4DBColumnName column,
                   boolean descending)
Set the sort column of the selection object.

Parameters:
column - the column to be used for searching
descending - true = sort Z..A, false sort A..Z

setEditingSelection

public void setEditingSelection(E4DBSelect_Intf selector)
                         throws java.lang.Exception
Sets the selection object, that is the object that contains data and enables filtering and sorting. It is important, when you use formatters to declare them before using this function!

Parameters:
selector - a selection object
Throws:
java.lang.Exception
See Also:
getEditingSelection()

getEditingColumns

public E4EditingPersistance.TableLayout getEditingColumns()
Get the editing columns defined.

Returns:
an Enumeration of e4s.html.editing.Editing_TableColumn objects. Each object specifies one (display-)table column, each column can contain one or several objects of class e4s.html.editing.Editing_DataField which is related to the (database-)column.
See Also:
setEditingColumns(java.util.Vector)

setEditingColumns

public void setEditingColumns(java.util.Vector vec)
                       throws java.lang.Exception
Set the editing columns defined.

Parameters:
vec - a Vector containing e4s.html.editing.Editing_TableColumn objects. Each object specifies one (display-)table column, each column can contain one or several objects of class e4s.html.editing.Editing_DataField which is related to the (database-)column.
Throws:
java.lang.Exception
See Also:
getEditingColumns()

readBlock

public boolean readBlock(E4ServletImplementation_Intf servlet)
                  throws java.lang.Exception
Read the current block. The current block is identified by the block-counter setActualBlock(int), getActualBlock(). When the current block is read by this function, this means that a database access will be performed, skipping some records before the current block and reading some records within the current block up to getDisplayBlockLength() records. If a search was defined, then only the records matching that search will be read. The E4SortedList-Element (getList() will be filled with actual data, including to define buttons for functionality such as delete/edit of records.

Returns:
true, if more data exists after the last included record.
Throws:
java.lang.Exception
See Also:
getActualBlock(), setActualBlock(int), getDisplayBlockLength(), getLastBlock(), getList()

getMethodEdit

public E4Method getMethodEdit()
Get the method defined to edit a record. This method is encapsulated in the E4EditingDataDescriptor and there is a E4EditingDataDescriptor required to define this method.

Returns:
null, if no E4EditingDataDescriptor is defined or if there is no method for editing defined within this descriptor.
See Also:
getMethodAdd(), getMethodDelete(), getDataDescriptor()

getMethodAdd

public E4Method getMethodAdd()
Get the method defined to add a record. This method is encapsulated in the E4EditingDataDescriptor and there is a E4EditingDataDescriptor required to define this method.

Returns:
null, if no E4EditingDataDescriptor is defined or if there is no method for adding defined within this descriptor.
See Also:
#getMethodEditing(), getMethodDelete(), getDataDescriptor()

getJsSave

public E4JavaScript getJsSave()

getJsCancel

public E4JavaScript getJsCancel()

getMethodDelete

public E4Method getMethodDelete()
Get the method defined to delete a record. This method is encapsulated in the E4EditingDataDescriptor and there is a E4EditingDataDescriptor required to define this method.

Returns:
null, if no E4EditingDataDescriptor is defined or if there is no method for deleting defined within this descriptor.
See Also:
getMethodAdd(), getMethodEdit(), getDataDescriptor()

countColumns

public int countColumns()

setColor_ResizeArea

public void setColor_ResizeArea(E4Color color)

getColor_ResizeArea

public E4Color getColor_ResizeArea()

setColor_ToolbarBackground

public void setColor_ToolbarBackground(E4Color color)

getColor_ToolbarBackground

public E4Color getColor_ToolbarBackground()

setColor_ToolbarCaption

public void setColor_ToolbarCaption(E4Color color)

getColor_ToolbarCaption

public E4Color getColor_ToolbarCaption()

getColor_ListBorder

public E4Color getColor_ListBorder()

setColor_ListBorder

public void setColor_ListBorder(E4Color color)

setCaptionText

public void setCaptionText(java.lang.String text)

setCaptionText

public void setCaptionText(E4Label_Intf text)

getCaptionText

public E4Label_Intf getCaptionText()

initDisplayBlockLength

public void initDisplayBlockLength()

setDisplayBlockLength

public void setDisplayBlockLength(int length)
Set the block length for display. This value is only valid for the current E4EditingElement object.

Parameters:
length - the length of the block,1 <= length <= {@link #MAX_BLOCK_LENGTH)
See Also:
getDisplayBlockLength(), initDisplayBlockLength()

getDisplayBlockLength

public int getDisplayBlockLength()
Get definition for the display block length.

Returns:
the block length, 1 <= return value <= {@link e4s.html.editing.E4EditingElement#MAX_BLOCK_LENGTH)
See Also:
E4EditingSettings.DISPLAY_BLOCK_LENGTH, E4EditingSettings.getDisplayBlockLength(), setDisplayBlockLength(int)

getActualBlock

public int getActualBlock()
Get the current (actual) block.

Returns:
a value for the actual block. getFirstBlock() <= return value <= getLastBlock()
See Also:
getFirstBlock(), getLastBlock(), setActualBlock(int), #readBlock()

setActualBlock

public void setActualBlock(int block)
Set the current (actual) block.

Parameters:
block - a value for the actual block. getFirstBlock() <= block <= getLastBlock()
See Also:
getFirstBlock(), getLastBlock(), getActualBlock(), #readBlock()

getList

public E4SortedList getList()
Get the current E4SortedList element that was initially created when the object was created and changed by every #readBlock().

See Also:
#readBlock()

getImageAdd

public IMG getImageAdd(boolean active)

getImageSave

public IMG getImageSave(boolean active)

getImageCancel

public IMG getImageCancel(boolean active)

getImagePrev

public IMG getImagePrev(boolean active)

getImageNext

public IMG getImageNext(boolean active)

getImageStart

public IMG getImageStart(boolean active)

getImageLast

public IMG getImageLast(boolean active)

getImageReload

public IMG getImageReload(boolean active)

getImageSettings

public IMG getImageSettings()

getImageSearch

public IMG getImageSearch(boolean active)

getImageSearchReset

public IMG getImageSearchReset(boolean active)

setImageAdd

public void setImageAdd(IMG add,
                        boolean active)

setImageSave

public void setImageSave(IMG save,
                         boolean active)

setImageCancel

public void setImageCancel(IMG cancel,
                           boolean active)

setImagePrev

public void setImagePrev(IMG prev,
                         boolean active)

setImageNext

public void setImageNext(IMG next,
                         boolean active)

setImageStart

public void setImageStart(IMG start,
                          boolean active)

setImageLast

public void setImageLast(IMG last,
                         boolean active)

setImageReload

public void setImageReload(IMG reload,
                           boolean active)

setImageSettings

public void setImageSettings(IMG settings)

setImageSearch

public void setImageSearch(IMG search,
                           boolean active)

setImageSearchReset

public void setImageSearchReset(IMG search_reset,
                                boolean active)

setActionSort

public void setActionSort(E4Method mref,
                          E4ServletImplementation_Intf servlet)

setActionSearch

public void setActionSearch(E4Method mref)

setActionSearchReset

public void setActionSearchReset(E4Method mref)

getActionSearch

public E4Method getActionSearch()

getActionSearchReset

public E4Method getActionSearchReset()

setFormatter

public void setFormatter(E4EditingFormatter_Intf formatter)

getFormatter

public java.util.Enumeration getFormatter()

findFormatter

public E4EditingFormatter_Intf findFormatter(E4DBColumnName cName)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

findFormatter

public E4EditingFormatter_Intf findFormatter(java.lang.Class clazz)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

findFormatter

public E4EditingFormatter_Intf findFormatter(java.lang.String classname)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

resetFormatter

public void resetFormatter()

createFIELDSET

public E4Fieldset createFIELDSET(FORM form,
                                 E4DBColumnInfo[] cols)
                          throws java.lang.Exception
Throws:
java.lang.Exception

findDataField

public E4EditingDefinitionDataField findDataField(E4DBColumnInfo cInfo)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

findDataField

public E4EditingDefinitionDataField findDataField(E4DBColumnName cName)
                                           throws java.lang.Exception
Throws:
java.lang.Exception

create_search_FIELDSET

public E4Fieldset create_search_FIELDSET(FORM form,
                                         E4CgiParams additional,
                                         E4ApplObj_Intf applobj)
                                  throws java.lang.Exception
Throws:
java.lang.Exception

setSearchFilter2

public void setSearchFilter2(E4ApplObj_Intf applobj)
                      throws java.lang.Exception
Rebuild a filter criteria defined previous. Use the parameter stored in the params variable (maybe comming from e4s.application.sysmodule.editing.E4ModuleEditingHandling01#searchExecute()) and store them in the editing columns definition, or in the case that this variable is null, then use the previous values out of the column definition which enables a subsequent setting of this filter.

Throws:
java.lang.Exception
See Also:
#setSearchFilter(e4s.html.E4CgiParams), resetSearchFilter(), e4s.application.sysmodule.editing.E4ModuleEditingHandling01#searchPrepare(), e4s.application.sysmodule.editing.E4ModuleEditingHandling01#searchExecute()

resetSearchFilter

public void resetSearchFilter()
                       throws java.lang.Exception
Resets any predefined search criteria.

Throws:
java.lang.Exception
See Also:
#setSearchFilter( e4s.html.E4CgiParams)

setSearchFilter

public void setSearchFilter(E4CgiParams params,
                            E4ApplObj_Intf applobj)
                     throws java.lang.Exception
Handling of search parameters used to define or rebuild a filter criteria. Use the parameter stored in the params variable (maybe comming from e4s.application.sysmodule.editing.E4ModuleEditingHandling01#searchExecute()) and store them in the editing columns definition, or in the case that this variable is null, then use the previous values out of the column definition which enables a subsequent setting of this filter.

Parameters:
params - the parameters, one for each search field or null to use previous stored parameters
Throws:
java.lang.Exception
See Also:
#setSearchFilter(e4s.html.E4CgiParams), resetSearchFilter(), E4ModuleEditingHandling01.searchPrepare, E4ModuleEditingHandling01.searchExecute

isFilterDefined

public boolean isFilterDefined()

calculateRowCount

public long calculateRowCount()
                       throws E4DBException
Throws:
E4DBException

getFirstBlock

public int getFirstBlock()
Get the first block.

Returns:
a value of 0.
See Also:
getLastBlock(), getActualBlock()

getLastBlock

public int getLastBlock()
                 throws E4DBException
Get the last available block. The last available block might be smaller than the number of records specified for a block (getDisplayBlockLength()), but it should not be empty.

Returns:
the highest available block number.
Throws:
E4DBException
See Also:
getFirstBlock(), getActualBlock()

setDisplayRowCounter

public void setDisplayRowCounter(boolean mode)
Enables the display of a row-counter. A row-counter is just a column in the table with incremental numbers, starting with 1 at each block. It is always displayed as the first column in the table. Sorting does not influence the row counter.

Parameters:
mode - enables (true) or disables (false) the display of the row counter
See Also:
getDisplayRowCounter()

getDisplayRowCounter

public boolean getDisplayRowCounter()
Get the state for display of a row-counter.

Returns:
true if the display of the row counter is enabled
See Also:
setDisplayRowCounter(boolean)

setDisplayIndex

public void setDisplayIndex(boolean mode)
Enables the display of an index table (one entry for each page). Should be disabled for huge tables. An index is a table with a cell displaying a block number, starting with 1, up to the number of blocks. When the user clicks on one of those, then this particular block is displayed.

Parameters:
mode - enables (true) or disables (false) the display of the index
See Also:
getDisplayIndex(), paintIndex(e4s.html.BODY,e4s.html.E4EventHandlerA), E4EditingFrameset.setDisplayIndex(boolean), e4s.application.sysmodule.editing.E4ModuleEditingHandling01#moveSelected

getDisplayIndex

public boolean getDisplayIndex()
Get the state for the display of an index table (one entry for each page). An index is a table with a cell displaying a block number, starting with 1, up to the number of blocks. When the user clicks on one of those, then this particular block is displayed.

Returns:
mode enables (true) or disables (false) the display of the index
See Also:
setDisplayIndex(boolean), paintIndex(e4s.html.BODY,e4s.html.E4EventHandlerA), E4EditingFrameset.setDisplayIndex(boolean), e4s.application.sysmodule.editing.E4ModuleEditingHandling01#moveSelected

paintIndex

public void paintIndex(BODY body,
                       E4EventHandlerA moveSpecified)
                throws java.lang.Exception
Get the state for the display of an index table (one entry for each page). An index is a table with a cell displaying a block number, starting with 1, up to the number of blocks. When the user clicks on one of those, then this particular block is displayed.

Parameters:
body - the structure where the output goes to
moveSpecified - a function handling the block to be displayed
sessionId - the sessionId of the E4EditingElement
Throws:
java.lang.Exception
See Also:
getDisplayIndex(), setDisplayIndex(boolean), E4EditingFrameset.setDisplayIndex(boolean), E4ModuleEditingHandling01.moveSpecified(e4s.html.HTML,e4s.html.E4CgiParams), E4ModuleEditingHandling01.PARAM_GOTO

setDataDescriptor

public void setDataDescriptor(E4EditingDataDescriptor descriptor)

getDataDescriptor

public E4EditingDataDescriptor getDataDescriptor()

E4ID

public E4ID E4ID()
Description copied from class: E4HtmlObject
Get the E4ID of the object. The E4ID is a unique identifier for an nested HTML element, it can be either the name of the class or any previous assigned string.

Overrides:
E4ID in class E4HtmlObject
Returns:
the E4ID
See Also:
E4HtmlObject.E4ID(String), E4HtmlObject.set_e4sID(e4s.util.E4ID)

hasUserdefinedFunctions

public boolean hasUserdefinedFunctions()
Determine, if userdefined functions are declared within the E4EditingDataDescriptor.

Returns:
true, if defined
See Also:
E4EditingDataDescriptor.getUserDefMethods()

enableLayoutProperties

public void enableLayoutProperties(boolean mode)
Disable the layout properties (show all columns with their default names as labels). If enabled, then the layout properties are read in from an XML file (@link e4s.html.editing.E4EditingPersistance} and the user has online capabilities to modify the layout.

Parameters:
true - means enabled (which is the default), and false means disabled
See Also:
#hasLayoutProperties(), getXmlLayoutFile()

useLayoutProperties

public boolean useLayoutProperties()
Get the state of the layout properties. If enabled, then the layout properties are read in from an XML file (@link e4s.html.editing.E4EditingPersistance} and the user has online capabilities to modify the layout.

Returns:
true means enabled (which is the default), and false means disabled
See Also:
enableLayoutProperties(boolean), getTranslationType()

setTranslationType

public void setTranslationType(int translation_type)

getTranslationType

public int getTranslationType()

collectTranslationsForEditing

public void collectTranslationsForEditing(E4TranslationsVec v,
                                          E4ServletImplementation_Intf servlet)
Description copied from class: E4HtmlElementGeneral
Build a list (Vector) with translation texts used so far during display of this page. Run throught all subclasses elements and collect their texts as well. Note, that a text will only be added one time. The Vector contains elements of class E4Label.

Specified by:
collectTranslationsForEditing in interface E4HtmlElement_Intf
Overrides:
collectTranslationsForEditing in class E4HtmlElementGeneral
Parameters:
v - the Vector where the styles will be collected, may not be null
servlet - the current servlet instance
See Also:
E4Label_Intf

toHtml

public void toHtml(E4StringBufferHtml buf,
                   E4CgiParams params,
                   E4ServletImplementation_Intf servlet)
            throws java.lang.Exception
Throws:
java.lang.Exception

toHtml

public void toHtml(E4StringBufferHtml buf,
                   E4ServletImplementation_Intf servlet)
            throws java.lang.Exception
Description copied from interface: E4HtmlElement_Intf
Create the HTML output for this element. Also run throught all child elements, and call their E4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) function to generate output of those objects which becomes appended. Normally, there is no need to call this function anyway, and this also might result in side effects of too-early relasing of objects in some cases. This function is called by E4ServletImplementation_Intf.write(e4s.html.E4HtmlElement) on the top level HTML element (common this is a HTML or BODY element) and branches down to all child elements.

Specified by:
toHtml in interface E4HtmlElement_Intf
Overrides:
toHtml in class E4HtmlElementGeneral
servlet - the servlet environment currently running in
Throws:
java.lang.Exception

addAdditionalParameters

public void addAdditionalParameters(E4CgiParams params,
                                    E4ServletImplementation_Intf servlet)
When the sort (or similar other functions) are called, pass those parameters to the called method.

Parameters:
params - parameters to be added, a value of null resets all the additional parameters. Please note, that parameters are not added, they are treatened as a whole block as defined in the param variable. Added means adding this to the Java Script.
See Also:
e4s.html.list.E4SortedList#addAdditionalParameters()

getAdditionalParameters

public E4CgiParams getAdditionalParameters()

collectScripts

public void collectScripts(E4ScriptsVec v,
                           E4ServletImplementation_Intf servlet)
Append the current script to the Vector, each script is identified by a name and can only appear onece in the Vector.

Specified by:
collectScripts in interface E4HtmlElement_Intf
Overrides:
collectScripts in class E4HtmlElementGeneral
Parameters:
v - the Vector where scripts are added.
servlet - the servlet context
See Also:
E4JavaScript

getObjectID

public java.lang.String getObjectID()
Get the ID of the Object, used for object persistance.

Specified by:
getObjectID in interface E4SessionObject_Intf
See Also:
E4ServletImplementation_Intf.getSessionObject(String)

setJsCanBranch

public void setJsCanBranch(java.lang.String js_name_can_branch)

getLanguage

public Language getLanguage()

getTableName

public E4DBTableName getTableName()

isDataAvailable

public boolean isDataAvailable()
Is data available based on the latest query?

Returns:
true if data is available

isFramesetVertical

public boolean isFramesetVertical()
Get the frameset layout of this editing element. Normally, the mode is vertical which means, that there are two frames (one left, one right) and the left frame contains the list, the right frame contains editing stuff. This can be changed using setFramesetVertical(boolean).

Returns:
true (default) if the frameset is vertical.
See Also:
setFramesetVertical(boolean)

setFramesetVertical

public void setFramesetVertical(boolean mode)
Set the frameset layout of this editing element. Normally, the mode is vertical which means, that there are two frames (one left, one right) and the left frame contains the list, the right frame contains editing stuff.

Parameters:
mode - true (default) uses the vertical frameset
See Also:
isFramesetVertical()

setXmlLayoutFile

public void setXmlLayoutFile(java.lang.String filename)
Optionally, sets the name for the XML descriptor file. By default the filename is taken based on the tablename so there is no need to set this value here.

See Also:
getXmlLayoutFile(), E4EditingPersistance.getXmlFilename(e4s.html.editing.E4EditingElement)

getXmlLayoutFile

public java.lang.String getXmlLayoutFile()
Get the name for the XML descriptor file. Normally, this file is based on the tablename and this will return null unless you specify explicit a name using setXmlLayoutFile(String).

Returns:
the name if defined
See Also:
setXmlLayoutFile(String), #hasLayoutProperties(), E4EditingPersistance.getXmlFilename(e4s.html.editing.E4EditingElement)

getNumRows4Display

public int[] getNumRows4Display()

getIncludeFreefieldsInSearch

public boolean getIncludeFreefieldsInSearch()

canHaveFreeFields

public boolean canHaveFreeFields()

setNumRows4Display

public void setNumRows4Display(int[] numrows)

setIncludeFreefieldsInSearch

public void setIncludeFreefieldsInSearch(boolean include_freefields)

toString

public java.lang.String toString()
Overrides:
toString in class E4Object

setEditingOnly

public void setEditingOnly(E4EditingElement.E4EditingElementOnlyEditing params)
This medthod disables the selection and the navigation and just opens one editing area

See Also:
getEditingOnly()

addAdditionalButton

public void addAdditionalButton(E4Method mref,
                                IMG image,
                                java.lang.String alt)

getAdditionalButtons

public E4EditingElement.E4EditingElementAdditionalButton[] getAdditionalButtons()

addAdditionalButton

public void addAdditionalButton(E4EditingElement.E4EditingElementAdditionalButton a)

getEditingOnly

public E4EditingElement.E4EditingElementOnlyEditing getEditingOnly()
This medthod disables the selection and the navigation and just opens one editing area

See Also:
#setEditingOnly()

www.element4solution.com