|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecte4s.util.E4Object
e4s.html.ajax.E4AjaxData
e4s.html.ajax.E4AjaxTable
public abstract class E4AjaxTable
Provide an ajax based table that provides paging, change columns and sorting. Requires an implementing instance or an above class around. $LastChangedDate: 2009-04-20 14:28:18 +0200 (Mo, 20 Apr 2009) $ $LastChangedRevision: 4244 $ $LastChangedBy: robert $
| Example_E4AjaxTable.java |
| Nested Class Summary | |
|---|---|
static class |
E4AjaxTable.E4AjaxTableColumn
|
| Field Summary |
|---|
| Fields inherited from class e4s.util.E4Object |
|---|
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET |
| Constructor Summary | |
|---|---|
E4AjaxTable(java.lang.String id)
|
|
| Method Summary | |
|---|---|
static java.lang.String |
_getSVNVersionString()
|
void |
changeSort(int column,
boolean ascending)
Do not call this function. |
void |
collectScripts(E4ScriptsVec vec,
E4ServletImplementation_Intf servlet)
This is an empty implementation. |
void |
collectStylesForEditing(E4StylesHash h,
E4ServletImplementation_Intf servlet)
This is an empty implementation. |
void |
collectTranslationsForEditing(E4TranslationsVec vec,
E4ServletImplementation_Intf servlet)
This is an empty implementation. |
void |
defineColumn(E4AjaxTable.E4AjaxTableColumn col)
Add a column (header) to the column layout structure. |
E4AjaxTable.E4AjaxTableColumn |
defineColumn(E4Label_Intf caption)
Add a column (header) to the column layout structure. |
E4AjaxTable.E4AjaxTableColumn |
defineColumn(E4Label_Intf caption,
Align align)
Add a column (header) to the column layout structure. |
void |
drawCaption(TD td)
|
int |
getActualPage()
Get the actual page |
abstract void |
getData(TD td,
int row,
int col,
E4ServletImplementation_Intf servlet)
|
java.lang.String |
getDivId()
This is the ID assoziated with the DIV element that holds the E4Ajax content and which is used as key within the E4AjaxDataRepository. |
E4JavaScript |
getJsForceReload(E4ServletImplementation_Intf servlet)
Provides a script that fordes the table to reload (resets table content for new rendering and calls Ajax request). |
E4JavaScript |
getJsPage(E4ServletImplementation_Intf servlet)
Provide a JavaScript that enables switsching to a particular page |
abstract int |
getNumRows()
This method must be implemented in the above implementation to define the number of data rows. |
int |
getPageSize()
|
boolean |
isSortingEnabled()
Check, if sorting is enabled |
void |
setCaption(E4Label_Intf caption)
Define a caption that is drawn on top of the table |
void |
setCellpadding(int cellpadding)
Set the cellpadding attribute for the main table (default = 1). |
void |
setCellspacing(int cellspacing)
Set the cellspacing attribute for the main table (default = 0). |
void |
setEnableChangeColumnOrder(boolean change_column_order)
|
void |
setEnableSorting(boolean sorting)
Define, if sorting is enabled. |
void |
setPageSize(int pagesize)
Set the size for one display page |
void |
setSTYLE(CLASS_Name style)
|
void |
setStyleCaption(CLASS_Name classname)
Define a CSS class for the caption. |
void |
toHtml(E4StringBufferHtml buf,
E4CgiParams params,
E4ServletImplementation_Intf servlet,
boolean initialLoad)
Use provided classes e.g. |
| Methods inherited from class e4s.html.ajax.E4AjaxData |
|---|
finalize, getSendReqScript, getSendReqScriptGeneric, getTrace, removeRemarksInHtml, runWithoutLogin, setAjaxElement, validate |
| 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, 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, toString, 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.ajax.E4AjaxData_Intf |
|---|
getTrace, removeRemarksInHtml, runWithoutLogin, setAjaxElement, validate |
| Constructor Detail |
|---|
public E4AjaxTable(java.lang.String id)
| Method Detail |
|---|
public void setStyleCaption(CLASS_Name classname)
classname - the CSS classsetCaption(E4Label_Intf)public void setCaption(E4Label_Intf caption)
caption - the caption, or null if any caption shall be removedsetStyleCaption(CLASS_Name)public void setEnableChangeColumnOrder(boolean change_column_order)
public void setEnableSorting(boolean sorting)
sorting - true enables sorting. If so, function changeSort(int, boolean) must be
overridden.changeSort(int, boolean),
isSortingEnabled(),
setEnableChangeColumnOrder(boolean)public boolean isSortingEnabled()
public void setPageSize(int pagesize)
pagesize - size of the pagepublic int getActualPage()
public void setCellspacing(int cellspacing)
setCellpadding(int)public void setCellpadding(int cellpadding)
setCellspacing(int)public void setSTYLE(CLASS_Name style)
public int getPageSize()
public java.lang.String getDivId()
E4AjaxData_IntfE4AjaxDataRepository.
This key must be unique within one user session.
You also can use getClass().getName() as ID if each data class is unique and will
represent a value unique within the session.
getDivId in interface E4AjaxData_Intf
public void toHtml(E4StringBufferHtml buf,
E4CgiParams params,
E4ServletImplementation_Intf servlet,
boolean initialLoad)
throws java.lang.Exception
E4AjaxData_Intfe4s.html.ajax.aTABLE for building the
HTML output. E4Ajax output is more tricky rather than normal HTML output as
the browser's DOM (document object model) is involved directly. This is the
reason, why the "normal" classes like TABLE shall not be used
here.
toHtml in interface E4AjaxData_Intfbuf - the buffer collecting all the output stuff (rendering results).params - the parameters filled into the form, if applicable, or null.servlet - the servlet's context, useful for e.g. determining the user
or application object in the need of database requests.
java.lang.Exceptione4s.html.ajax.aTABLE#toHtml,
e4s.html.ajax.aA#toHtml,
e4s.html.ajax.aB#toHtml,
e4s.html.ajax.aI#toHtml,
e4s.html.ajax.aFONT#toHtmlpublic void drawCaption(TD td)
public E4JavaScript getJsPage(E4ServletImplementation_Intf servlet)
getActualPage(),
getJsForceReload(e4s.servlet.E4ServletImplementation_Intf)public E4JavaScript getJsForceReload(E4ServletImplementation_Intf servlet)
servlet - a valid servlet context
public E4AjaxTable.E4AjaxTableColumn defineColumn(E4Label_Intf caption,
Align align)
caption - a label for the captionalign - define an alignment for the columndefineColumn(e4s.translate.E4Label_Intf, e4s.html.Align),
defineColumn(E4AjaxTableColumn)public E4AjaxTable.E4AjaxTableColumn defineColumn(E4Label_Intf caption)
caption - a label for the captiondefineColumn(e4s.translate.E4Label_Intf, e4s.html.Align),
defineColumn(E4AjaxTableColumn)public void defineColumn(E4AjaxTable.E4AjaxTableColumn col)
col - the column definitiondefineColumn(e4s.translate.E4Label_Intf, e4s.html.Align),
defineColumn(e4s.translate.E4Label_Intf)
public void collectScripts(E4ScriptsVec vec,
E4ServletImplementation_Intf servlet)
E4AjaxData
collectScripts in interface E4AjaxData_IntfcollectScripts in class E4AjaxDatavec - the script vectorservlet - the servlet's context
public void collectTranslationsForEditing(E4TranslationsVec vec,
E4ServletImplementation_Intf servlet)
E4AjaxData
collectTranslationsForEditing in interface E4AjaxData_IntfcollectTranslationsForEditing in class E4AjaxDatavec - the translations vectorservlet - the servlet's context
public void collectStylesForEditing(E4StylesHash h,
E4ServletImplementation_Intf servlet)
E4AjaxData
collectStylesForEditing in interface E4AjaxData_IntfcollectStylesForEditing in class E4AjaxDatah - the styles collectionservlet - the servlet's contextpublic abstract int getNumRows()
public abstract void getData(TD td,
int row,
int col,
E4ServletImplementation_Intf servlet)
public void changeSort(int column,
boolean ascending)
column - the actual columnascending - sort ascending if truesetEnableSorting(boolean)public static java.lang.String _getSVNVersionString()
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||