|
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.E4HtmlObject
e4s.html.E4HtmlElementGeneral
e4s.html.E4HtmlElement
e4s.html.E4HtmlContentElement
e4s.html.DIV
e4s.html.ajax.E4AjaxElementGeneral
public abstract class E4AjaxElementGeneral
Ajax element implementation (bridge between HTML elements and E4AjaxData_Intf
| Field Summary | |
|---|---|
static java.lang.String |
JS_XML_HTTP_REQUEST
Java-Script function to get the E4Ajax object. |
protected boolean |
m_debug
|
protected java.lang.String |
m_id
|
protected java.lang.String |
m_js_AEP_callback_after
|
protected java.lang.String |
m_js_AEP_callback_before
|
protected java.lang.String |
m_url
|
protected static int |
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 | |
|---|---|
protected |
E4AjaxElementGeneral(E4AjaxData_Intf data)
|
|
E4AjaxElementGeneral(E4AjaxData_Intf data,
E4ServletImplementation_Intf servlet)
Create an E4AjaxElement. |
|
E4AjaxElementGeneral(E4AjaxData_Intf data,
E4ServletImplementation_Intf servlet,
boolean debug)
Create an E4AjaxElement. |
|
E4AjaxElementGeneral(E4AjaxData_Intf data,
E4ServletImplementation_Intf servlet,
boolean debug,
boolean name_scripts)
Create an E4AjaxElement. |
|
E4AjaxElementGeneral(E4AjaxData_Intf data,
int width,
int height,
E4ServletImplementation_Intf servlet)
Create an E4AjaxElement. |
|
E4AjaxElementGeneral(E4AjaxData_Intf data,
int width,
int height,
E4ServletImplementation_Intf servlet,
boolean debug)
Create an E4AjaxElement. |
protected |
E4AjaxElementGeneral(java.lang.String div_id)
|
| Method Summary | |
|---|---|
static java.lang.String |
_getSVNVersionString()
Get version info string from subversion. |
void |
collectScripts(E4ScriptsVec v,
E4ServletImplementation_Intf servlet)
Get a vector of used scripts from all subelements. |
void |
collectStylesForEditing(E4StylesHash h,
E4ServletImplementation_Intf servlet)
Build a list (Vector) with style definitions used so far during display of this page. |
void |
collectTranslationsForEditing(E4TranslationsVec vec,
E4ServletImplementation_Intf servlet)
Build a list (Vector) with translation texts used so far during display of this page. |
boolean |
getDebug()
Get the debug mode, which causes some E4JavaScript alert messages to be displayed. |
E4JavaScript |
getJsCallMethod()
|
E4Method |
getMethodDispacher()
Get the method responsible for handling the E4Ajax request. |
E4EventHandlerInputField |
getOnChange(FORM form)
This event handler is intended to be used if activation of the E4Ajax element shall take place on a field's value change. |
E4EventHandlerA |
getOnClick()
This event handler is intended to be used if activation of the E4Ajax element shall take place on a user click. |
E4EventHandlerBUTTON |
getOnClick(FORM form)
This event handler is intended to be used if activation of the E4Ajax element shall take place on a user click. |
protected E4JavaScript |
getOnReadyRequest()
Only internal usage |
E4EventHandlerBODY |
getOnTimer()
Create a JavaScript that call's itself several time after a period specified by setTimeout(long),
initially this should be called as body-on-load, that is why this script is a bode eventhandler. |
E4EventHandlerBODY |
getOnTimer(long timeout)
Create a JavaScript that call's itself several time after a period specified by a given parameter, initially this should be called as body-on-load, that is why this script is a bode eventhandler. |
E4JavaScript |
getSendReqScript()
|
E4JavaScript |
getSendReqScriptGeneric()
|
boolean |
getShowOnLoad()
Enables or disables display of the data content during display of the E4Ajax-Element. |
long |
getTimeout()
Get the timeout for the refresh cycle. |
void |
prepare(BODY body)
Adds a necessary event handler to the body. |
void |
setAEPCallbackScript_After(E4JavaScript js)
|
void |
setAEPCallbackScript_After(java.lang.String js_name)
|
void |
setAEPCallbackScript_Before(E4JavaScript js)
|
void |
setAEPCallbackScript_Before(java.lang.String js_name)
|
protected void |
setData(E4AjaxData_Intf data,
boolean debug,
boolean name_scripts,
E4ServletImplementation_Intf servlet)
|
protected void |
setData(E4AjaxData_Intf data,
boolean debug,
E4ServletImplementation_Intf servlet)
|
void |
setMethodDispacher(E4Method mref,
E4ServletImplementation_Intf servlet)
Set the method responsible for handling the E4Ajax request. |
void |
setNameScripts(boolean mode)
Choose, if scripts shall be named according to a prefix and the DIV.getDivId(). |
void |
setShowOnLoad(boolean mode)
Enables or disables display of the data content during display of the E4Ajax-Element. |
void |
setTimeout(long ms)
Set the timeout for the refresh cycle. |
void |
toHtml(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
Create the HTML output for this element. |
java.lang.String |
toString()
|
protected void |
updateOnReadyReq()
|
protected abstract void |
updateOnReadyReqCore(E4JavaScript js)
|
boolean |
validate(E4CgiParams params,
E4ServletImplementation_Intf servlet)
Run throught all child elements recursivly, and if those elements implement interface E4InputField_Intf then
store the parameter and execute the E4InputField_Intf.validate() function. |
| 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.E4HtmlElement |
|---|
addElement, addElement, addElement, copyElements, print |
| 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, debugToString, findElement, findElement, getElements, getElementsVec, getField, getId, getStringContent, isContentClass, removeAll, removeElementById, removeElements, set_e4sID, setId, setReadOnly, setValue, toHtml_hidden |
| Field Detail |
|---|
protected java.lang.String m_js_AEP_callback_before
protected java.lang.String m_js_AEP_callback_after
protected java.lang.String m_id
protected java.lang.String m_url
protected boolean m_debug
protected static final int READY_STATE_COMPLETE
public static final java.lang.String JS_XML_HTTP_REQUEST
E4AjaxScripts.JS_AJAX.
| Constructor Detail |
|---|
protected E4AjaxElementGeneral(java.lang.String div_id)
public E4AjaxElementGeneral(E4AjaxData_Intf data,
E4ServletImplementation_Intf servlet)
data - the E4Ajax-Data references to the data beeing displayed and rendered. It is stored internally
and will be used asynchronouslyservlet - a valid servlet context (@link e4s.servlet.E4ModuleImplementation#getServlet()}E4HtmlContentElement.AjaxElement(e4s.html.ajax.E4AjaxData_Intf,e4s.servlet.E4ServletImplementation_Intf)
public E4AjaxElementGeneral(E4AjaxData_Intf data,
E4ServletImplementation_Intf servlet,
boolean debug)
data - the E4Ajax-Data references to the data beeing displayed and rendered. It is stored internally
and will be used asynchronouslydebug - if true then an alert with the rendered output will be displayed - only for development environmentsservlet - a valid servlet context (@link e4s.servlet.E4ModuleImplementation#getServlet()}e4s.html.E4HtmlContentElement#E4AjaxElement
public E4AjaxElementGeneral(E4AjaxData_Intf data,
E4ServletImplementation_Intf servlet,
boolean debug,
boolean name_scripts)
data - the E4Ajax-Data references to the data beeing displayed and rendered. It is stored internally
and will be used asynchronouslydebug - if true then an alert with the rendered output will be displayed - only for development environmentsservlet - a valid servlet context (@link e4s.servlet.E4ModuleImplementation#getServlet()}e4s.html.E4HtmlContentElement#E4AjaxElementprotected E4AjaxElementGeneral(E4AjaxData_Intf data)
public E4AjaxElementGeneral(E4AjaxData_Intf data,
int width,
int height,
E4ServletImplementation_Intf servlet)
data - the E4Ajax-Data references to the data beeing displayed and rendered. It is stored internally
and will be used asynchronouslywidth - horizontal size of the DIV-elementheight - vertical size of the DIV-elementservlet - a valid servlet context (@link e4s.servlet.E4ModuleImplementation#getServlet()}e4s.html.E4HtmlContentElement#E4AjaxElement
public E4AjaxElementGeneral(E4AjaxData_Intf data,
int width,
int height,
E4ServletImplementation_Intf servlet,
boolean debug)
data - the E4Ajax-Data references to the data beeing displayed and rendered. It is stored internally
and will be used asynchronouslydebug - if true then an alert with the rendered output will be displayed - only for development environmentswidth - horizontal size of the DIV-elementheight - vertical size of the DIV-elementservlet - a valid servlet context (@link e4s.servlet.E4ModuleImplementation#getServlet()}e4s.html.E4HtmlContentElement#E4AjaxElement| Method Detail |
|---|
protected void setData(E4AjaxData_Intf data,
boolean debug,
E4ServletImplementation_Intf servlet)
protected void setData(E4AjaxData_Intf data,
boolean debug,
boolean name_scripts,
E4ServletImplementation_Intf servlet)
public E4JavaScript getJsCallMethod()
public void prepare(BODY body)
#setTimeout(int).
body - the BODY element#setTimeout(int),
getOnTimer()public E4EventHandlerA getOnClick()
A,
getOnTimer()public E4EventHandlerInputField getOnChange(FORM form)
the - form used to generate a script referencing the name of the form if specified, or referenced
to document.forms[0] if that form parameter is null.
FORM,
getOnTimer()public E4EventHandlerBUTTON getOnClick(FORM form)
FORM,
getOnTimer()public E4EventHandlerBODY getOnTimer()
setTimeout(long),
initially this should be called as body-on-load, that is why this script is a bode eventhandler.
getOnTimer(long),
setTimeout(long)public E4EventHandlerBODY getOnTimer(long timeout)
timeout - the timeout in milliseconds
getOnTimer(),
setTimeout(long)public E4Method getMethodDispacher()
#setMethodDispacher(e4s.html.E4Method),
E4ModuleAjaxDispacher.getAjaxData
public void setMethodDispacher(E4Method mref,
E4ServletImplementation_Intf servlet)
E4ModuleAjaxDispacher.getAjaxData by default.
mref - the method reflection, null (default) to use the system implementationgetMethodDispacher(),
E4ModuleAjaxDispacher.getAjaxDatapublic E4JavaScript getSendReqScriptGeneric()
public E4JavaScript getSendReqScript()
protected E4JavaScript getOnReadyRequest()
protected abstract void updateOnReadyReqCore(E4JavaScript js)
protected void updateOnReadyReq()
public void setTimeout(long ms)
ms - the timeout period in milliseconds, a value of -1 indicates that there
will be no timeout.getTimeout(),
getOnTimer(),
getOnTimer(long),
prepare(e4s.html.BODY)public long getTimeout()
setTimeout(long)
public void toHtml(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
throws java.lang.Exception
E4HtmlElement_IntfE4HtmlElement_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.
toHtml in interface E4HtmlElement_IntftoHtml in class DIVservlet - the servlet environment currently running in
java.lang.Exception
public void collectScripts(E4ScriptsVec v,
E4ServletImplementation_Intf servlet)
E4HtmlElementGeneral
collectScripts in interface E4HtmlElement_IntfcollectScripts in class E4HtmlElementGeneralv - collect the names of all scriptsservlet - the servlet contextE4JavaScript
public void collectTranslationsForEditing(E4TranslationsVec vec,
E4ServletImplementation_Intf servlet)
E4HtmlElementGeneralE4Label.
collectTranslationsForEditing in interface E4HtmlElement_IntfcollectTranslationsForEditing in class E4HtmlElementGeneralvec - the Vector where the styles will be collected, may not be nullservlet - the current servlet instanceE4Label_Intf
public void collectStylesForEditing(E4StylesHash h,
E4ServletImplementation_Intf servlet)
E4HtmlElementGeneralE4StyleUsage.
collectStylesForEditing in interface E4HtmlElement_IntfcollectStylesForEditing in class E4HtmlElementGeneralh - the Vector where the styles will be collected, may not be nullservlet - the servlet contextE4ServletImplementation_Intf.sessionCanEditStyles(),
#collectStylesForEditing(e4s.html.style.E4StylesHash, STYLE_Name, boolean)public void setShowOnLoad(boolean mode)
mode - true = display the content on load, false do not display (default)
#see getShowOnLoadpublic boolean getShowOnLoad()
public boolean getDebug()
public java.lang.String toString()
toString in class DIVpublic void setAEPCallbackScript_Before(E4JavaScript js)
public void setAEPCallbackScript_Before(java.lang.String js_name)
public void setAEPCallbackScript_After(E4JavaScript js)
public void setAEPCallbackScript_After(java.lang.String js_name)
public boolean validate(E4CgiParams params,
E4ServletImplementation_Intf servlet)
throws java.lang.Exception
E4HtmlElementGeneralE4InputField_Intf then
store the parameter and execute the E4InputField_Intf.validate() function. In any case, you can use
this function as well to set values out of the E4CgiParams to the E4InputField_Intf objects.
validate in interface E4HtmlElement_Intfvalidate in class E4HtmlElementGeneralparams - the current cgi parameters
java.lang.ExceptionE4InputField_Intf.validate(),
E4HtmlElementGeneral.setValue(e4s.html.E4CgiParams),
e4s.html.input.extended.E4InputField#validate(e4s.html.E4CgiParams)public static java.lang.String _getSVNVersionString()
E4Util.getRevisionCodeFromSVN(Class)public void setNameScripts(boolean mode)
DIV.getDivId().
mode - true: use named scripts, false: use generic names for scripts
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||