|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface E4AjaxData_Intf
Interface for retrieving data using the E4Ajax mechanism.
Create a e4s.html.AjaxElement and add it to your HTML document
(or nested elements). The e4s.html.AjaxElement will contain all necessary scripting
and is inheritaded by a DIV element having an ID for identification.
It also contains a refresh timeout, but no data. Data instead is provided by this interface which
will be "called" by a client-side java script (timer) via the module implementation
E4ModuleAjaxDispacher with the ID as parameter.
Because it is certain unclear, when data will be required, it will be collected in an
E4AjaxDataRepository controlled by the E4ModuleAjaxDispacher module
and stored as session object.
See: http://www.w3.org/TR/XMLHttpRequest/
| Example_Ajax_A.java |
| Example_Ajax_FORM.java |
| Example_Ajax_Timer.java |
e4s.html.AjaxElement,
E4AjaxDataRepository,
E4ModuleAjaxDispacher,
E4AjaxVec| Method Summary | |
|---|---|
void |
collectScripts(E4ScriptsVec vec,
E4ServletImplementation_Intf servlet)
Collect the E4JavaScript required to display this
element and all it's sub components. |
void |
collectStylesForEditing(E4StylesHash h,
E4ServletImplementation_Intf servlet)
Collect the styles ( e4s.html.css.CLASS_Name) for style editing. |
void |
collectTranslationsForEditing(E4TranslationsVec vec,
E4ServletImplementation_Intf servlet)
Collect the translations ( E4Label_Intf) for translation editing. |
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. |
int |
getTrace()
Enable trace of ajax output. |
boolean |
removeRemarksInHtml()
|
boolean |
runWithoutLogin()
|
void |
setAjaxElement(E4AjaxElementGeneral element)
|
void |
toHtml(E4StringBufferHtml buf,
E4CgiParams params,
E4ServletImplementation_Intf servlet,
boolean initialLoad)
Use provided classes e.g. |
boolean |
validate(E4CgiParams params,
E4ServletImplementation_Intf servlet)
|
| Method Detail |
|---|
java.lang.String getDivId()
E4AjaxDataRepository.
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.
void toHtml(E4StringBufferHtml buf,
E4CgiParams params,
E4ServletImplementation_Intf servlet,
boolean initialLoad)
throws java.lang.Exception
e4s.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.
buf - 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.initial - true when the element is drawn initially on the web page (no
ajax request occured so far. See e4s.html.AjaxElement#setShowOnLoad(boolean).
This is because you might to need a distinction if parameters are passed
or not so far.
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#toHtml
void collectScripts(E4ScriptsVec vec,
E4ServletImplementation_Intf servlet)
E4JavaScript required to display this
element and all it's sub components.
vec - the script vectorservlet - the servlet's context
void collectTranslationsForEditing(E4TranslationsVec vec,
E4ServletImplementation_Intf servlet)
E4Label_Intf) for translation editing.
vec - the translations vectorservlet - the servlet's context
void collectStylesForEditing(E4StylesHash h,
E4ServletImplementation_Intf servlet)
e4s.html.css.CLASS_Name) for style editing.
h - the styles collectionservlet - the servlet's contextvoid setAjaxElement(E4AjaxElementGeneral element)
int getTrace()
E4Client.getTemporaryDirectoryAbs(). This is a particular setting for a single
Ajax element, there is also a more global setting E4ModuleImplementation.setAjaxTrace(boolean).
E4ModuleImplementation.setAjaxTrace(boolean)E4ModuleImplementation.setAjaxTrace(boolean)
boolean validate(E4CgiParams params,
E4ServletImplementation_Intf servlet)
throws java.lang.Exception
java.lang.Exceptionboolean runWithoutLogin()
boolean removeRemarksInHtml()
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||