www.element4solution.com

e4s.html.input.inlineedit
Class E4InlineEdit

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.E4HtmlContentElement
                      extended by e4s.html.DIV
                          extended by e4s.html.ajax.E4AjaxElementGeneral
                              extended by e4s.html.E4AjaxElement
                                  extended by e4s.html.input.inlineedit.E4InlineEdit
All Implemented Interfaces:
E4HtmlElement_Intf, E4ClientObject_Intf, E4SessionObject_Intf
Direct Known Subclasses:
E4InlineEditCached

public abstract class E4InlineEdit
extends E4AjaxElement
implements E4HtmlElement_Intf, E4SessionObject_Intf, E4ClientObject_Intf

Ajax based inline data editing: the DIV element contains one or more lines of data, each line contains one or more E4InputField_Intf elements. Each element is identified by a unique E4InputFieldName_Intf. There is only one row at a time able for editing, or one row can be added which is added at the end of the list.


Field Summary
static int _COMMAND_ADD
           
static int _COMMAND_CANCEL
           
static int _COMMAND_DELETE
           
static int _COMMAND_EDIT
           
static int _COMMAND_SAVE
           
static E4InputFieldName PARAM_COMMAND
           
 
Fields inherited from class e4s.html.ajax.E4AjaxElementGeneral
JS_XML_HTTP_REQUEST, m_debug, m_id, m_js_AEP_callback_after, m_js_AEP_callback_before, m_url, READY_STATE_COMPLETE
 
Fields inherited from class e4s.html.DIV
DEFAULTSTYLE, HTML_TAG
 
Fields inherited from class e4s.html.E4HtmlContentElement
BOOL_STR_FALSE, BOOL_STR_TRUE
 
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
E4InlineEdit(java.lang.String div_id, boolean can_add, boolean can_edit, boolean can_delete, E4ServletImplementation_Intf servlet)
           
E4InlineEdit(java.lang.String div_id, E4ServletImplementation_Intf servlet)
           
E4InlineEdit(java.lang.String div_id, FORM form, boolean can_add, boolean can_edit, boolean can_delete, E4ServletImplementation_Intf servlet)
           
E4InlineEdit(java.lang.String div_id, FORM form, E4ServletImplementation_Intf servlet)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
abstract  void addRow(E4Fieldset fieldset)
           
abstract  void deleteRow(int row)
           
 e4s.html.input.inlineedit.E4InlineEdit.E4LineAddData getAjaxData()
           
 E4HtmlElement_Intf getButtonAdd()
          Can be overwritten: get the content for the add trigger, e.g. a graphic.
 E4HtmlElement_Intf getButtonCancel()
          Can be overwritten: get the content for the cancel trigger, e.g. a graphic.
 E4HtmlElement_Intf getButtonDelete()
          Can be overwritten: get the content for the delete trigger, e.g. a graphic.
 E4HtmlElement_Intf getButtonEdit()
          Can be overwritten: get the content for the editing trigger, e.g. a graphic.
 E4HtmlElement_Intf getButtonSave()
          Can be overwritten: get the content for the save trigger, e.g. a graphic.
abstract  int getNumRows()
          Get the initial number of rows.
 java.lang.String getObjectID()
          Get the ID of the Object.
 void register(E4AjaxDataRepository repository)
           
abstract  void saveRow(int row, E4Fieldset fieldset)
           
 void setAddOnInit()
           
 void setDisplayLabels(boolean display_labels)
          Set the display of labels (first row) on or off.
 void setDisplayRowcount(boolean display_rowcount)
          Set the display of a row counter (first column) on or off.
 void setField(E4InputField_Intf field)
          Add a field to the representation of a row.
 void setFields(E4Fieldset fieldset)
          Define the data fields for one representative row.
 void setFields(E4InputField_Intf[] fields)
          Define the data fields for one representative row.
 void setForm(FORM form)
           
abstract  void setRow(int row, E4Fieldset fieldset)
           
 
Methods inherited from class e4s.html.E4AjaxElement
updateOnReadyReqCore
 
Methods inherited from class e4s.html.ajax.E4AjaxElementGeneral
collectScripts, collectStylesForEditing, collectTranslationsForEditing, getDebug, getJsCallMethod, getMethodDispacher, getOnChange, getOnClick, getOnClick, getOnReadyRequest, getOnTimer, getOnTimer, getSendReqScript, getSendReqScriptGeneric, getShowOnLoad, getTimeout, prepare, setAEPCallbackScript_After, setAEPCallbackScript_After, setAEPCallbackScript_Before, setAEPCallbackScript_Before, setData, setData, setMethodDispacher, setNameScripts, setShowOnLoad, setTimeout, toHtml, toString, updateOnReadyReq, validate
 
Methods inherited from class e4s.html.DIV
eventHandlers, getAlign, getDivId, getStyleHide, hide, jsClear, jsHide, jsIsOpen, jsShow, jsWrite, onMouseOut, onMouseOver, setAlign, setEventHandler, setSTYLE, setStyle, setStyleHide, setTitle, show, toHtml
 
Methods inherited from class e4s.html.E4HtmlContentElement
A_Email, A_Email, A_Multiple, A_Popup, A_Popup, A_Popup, A_Popup, A_Popup, A_Popup, A_Popup, A_Reference, A_Reference, A_Reference, A_Reference, A_Reference, A_ReturnValue, A_ReturnValue, A_ReturnValue, A_ReturnValue, A, A, A, A, A, A, A, AjaxElement, AjaxElement, AjaxElement, B, B, BIG, Box, Box, Box, BoxRoundCorners, BoxRoundCorners, BoxRoundCorners, BR, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, CENTER, DEL, DIV, DIV, DIV, DIV, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FullSizeE4Message, H1, H2, H3, H4, Hint, HR, I, I, IMG, IMG, IMG, IMG, IMG, IMG, IMG, IMG, INS, Message, Message, Message, Message, Message, NBSP, NOBR, P_NBSP, P, PRE, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, rem, rem, rem, rem, rem, rem, SMALL, SPAN, STRIKE, strike, SystemError, SystemError, SystemError, SystemError, TABLE, TABLE, trace, trace, trace, trace, trace, trace, translate_Sys, translate, U, UL
 
Methods inherited from class e4s.html.E4HtmlElement
addElement, addElement, addElement, copyElements, print
 
Methods inherited from class e4s.html.E4HtmlElementGeneral
addScript, addScript, addScript, addStyleForEditing, addTranslationForEditing, buildStyleAttribute, buildStyleClassReference, 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
 
Methods inherited from class e4s.html.E4HtmlObject
E4ID, 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, collectScripts, collectStylesForEditing, collectTranslationsForEditing, debugToString, findElement, findElement, getElements, getElementsVec, getField, getId, getStringContent, isContentClass, removeAll, removeElementById, removeElements, set_e4sID, setId, setReadOnly, setValue, toHtml_hidden, toHtml, validate
 

Field Detail

PARAM_COMMAND

public static final E4InputFieldName PARAM_COMMAND

_COMMAND_ADD

public static final int _COMMAND_ADD
See Also:
Constant Field Values

_COMMAND_DELETE

public static final int _COMMAND_DELETE
See Also:
Constant Field Values

_COMMAND_EDIT

public static final int _COMMAND_EDIT
See Also:
Constant Field Values

_COMMAND_SAVE

public static final int _COMMAND_SAVE
See Also:
Constant Field Values

_COMMAND_CANCEL

public static final int _COMMAND_CANCEL
See Also:
Constant Field Values
Constructor Detail

E4InlineEdit

public E4InlineEdit(java.lang.String div_id,
                    E4ServletImplementation_Intf servlet)

E4InlineEdit

public E4InlineEdit(java.lang.String div_id,
                    FORM form,
                    E4ServletImplementation_Intf servlet)

E4InlineEdit

public E4InlineEdit(java.lang.String div_id,
                    boolean can_add,
                    boolean can_edit,
                    boolean can_delete,
                    E4ServletImplementation_Intf servlet)

E4InlineEdit

public E4InlineEdit(java.lang.String div_id,
                    FORM form,
                    boolean can_add,
                    boolean can_edit,
                    boolean can_delete,
                    E4ServletImplementation_Intf servlet)
Method Detail

getObjectID

public java.lang.String getObjectID()
Description copied from interface: E4ClientObject_Intf
Get the ID of the Object.

Specified by:
getObjectID in interface E4ClientObject_Intf
Specified by:
getObjectID in interface E4SessionObject_Intf

getNumRows

public abstract int getNumRows()
                        throws java.lang.Exception
Get the initial number of rows. This function is abstract, so it requires to be implemented in an above instance. It will be called more often. If the number of rows is in the range 20 or more, we recommend paging which can be set using #setPageSize(int).

Returns:
the number of existing rows (might be 0)
Throws:
java.lang.Exception
See Also:
#setNewRows(int), #setPageSize(int), setRow(int,e4s.html.input.extended.E4Fieldset), setFields(e4s.html.input.extended.E4Fieldset), #saveRow(int,boolean,e4s.html.input.extended.E4Fieldset)

setRow

public abstract void setRow(int row,
                            E4Fieldset fieldset)
                     throws java.lang.Exception
Throws:
java.lang.Exception

saveRow

public abstract void saveRow(int row,
                             E4Fieldset fieldset)
                      throws java.lang.Exception
Throws:
java.lang.Exception

addRow

public abstract void addRow(E4Fieldset fieldset)
                     throws java.lang.Exception
Throws:
java.lang.Exception

deleteRow

public abstract void deleteRow(int row)
                        throws java.lang.Exception
Throws:
java.lang.Exception

getButtonCancel

public E4HtmlElement_Intf getButtonCancel()
Can be overwritten: get the content for the cancel trigger, e.g. a graphic. Will be inside an A tag later, the default implementation uses e4s.util.E4Images.cancel_small_1.

See Also:
getButtonSave(), getButtonAdd(), getButtonEdit(), getButtonDelete()

getButtonSave

public E4HtmlElement_Intf getButtonSave()
Can be overwritten: get the content for the save trigger, e.g. a graphic. Will be inside an A tag later, the default implementation uses e4s.util.E4Images.save_small_1.

See Also:
getButtonCancel(), getButtonAdd(), getButtonEdit(), getButtonDelete()

getButtonAdd

public E4HtmlElement_Intf getButtonAdd()
Can be overwritten: get the content for the add trigger, e.g. a graphic. Will be inside an A tag later, the default implementation uses e4s.util.E4Images.add_small_1.

See Also:
getButtonCancel(), getButtonSave(), getButtonEdit(), getButtonDelete()

getButtonEdit

public E4HtmlElement_Intf getButtonEdit()
Can be overwritten: get the content for the editing trigger, e.g. a graphic. Will be inside an A tag later, the default implementation uses e4s.util.E4Images.editing_small_1.

See Also:
getButtonCancel(), getButtonSave(), getButtonAdd(), getButtonDelete()

getButtonDelete

public E4HtmlElement_Intf getButtonDelete()
Can be overwritten: get the content for the delete trigger, e.g. a graphic. Will be inside an A tag later, the default implementation uses e4s.util.E4Images.delete_small_1.

See Also:
getButtonCancel(), getButtonSave(), getButtonEdit(), getButtonAdd()

setField

public void setField(E4InputField_Intf field)
Add a field to the representation of a row.

See Also:
setFields(e4s.html.input.extended.E4Fieldset), setFields(e4s.html.input.extended.E4InputField_Intf[])

setFields

public void setFields(E4InputField_Intf[] fields)
Define the data fields for one representative row. The array index indicates the column. When running, this fields are expanded to rows given each field an individual value by setRow(int, e4s.html.input.extended.E4Fieldset). Each field will get a unique name while rolled out to the different input rows.

Parameters:
fields - an array of fields, each representing a column in the input table
See Also:
#getFields(), setFields(e4s.html.input.extended.E4Fieldset)

setFields

public void setFields(E4Fieldset fieldset)
Define the data fields for one representative row. The fieldset index indicates the whole row. When running, this fields are expanded to rows given each field an individual value by setRow(int, e4s.html.input.extended.E4Fieldset). Each field will get a unique name while rolled out to the different input rows.

Parameters:
fieldset - contains the fields (one row only)
See Also:
#getFields(), #setFields(e4s.html.input.extended.E4InputField_Intf)

setDisplayRowcount

public void setDisplayRowcount(boolean display_rowcount)
Set the display of a row counter (first column) on or off.

Parameters:
display_rowcount - false if rowcount shall not be displayed (default)
See Also:
setDisplayRowcount(boolean)

setDisplayLabels

public void setDisplayLabels(boolean display_labels)
Set the display of labels (first row) on or off.

Parameters:
display_labels - true if labels shall be displayed (default)
See Also:
setDisplayRowcount(boolean)

setAddOnInit

public void setAddOnInit()

getAjaxData

public e4s.html.input.inlineedit.E4InlineEdit.E4LineAddData getAjaxData()

register

public void register(E4AjaxDataRepository repository)

setForm

public void setForm(FORM form)

_getSVNVersionString

public static java.lang.String _getSVNVersionString()
Get version info string from subversion.

Returns:
the version info string.
See Also:
E4Util.getRevisionCodeFromSVN(Class)

www.element4solution.com