|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface E4HtmlElement_Intf
Common interface declaration for HTML elements. Basically this implements their sub (child) elements, how to render HTML and Java-Script handling.
| Example_HtmlElement_Intf.java |
| Method Summary | |
|---|---|
void |
addScript(E4HtmlElement_Intf element,
E4ServletImplementation_Intf servlet)
Add the E4JavaScript_Intf entries of the specified element
to the current element. |
void |
addScript(E4JavaScript_Intf scriptname)
Add this script to the scripts Vector. |
void |
addScript(E4JavaScript_Intf scriptname,
boolean replace)
Add this script to the scripts Vector. |
void |
collectScripts(E4ScriptsVec vec,
E4ServletImplementation_Intf servlet)
Get a vector of used scripts. |
void |
collectStylesForEditing(E4StylesHash v,
E4ServletImplementation_Intf servlet)
Build a list (Vector) with style definitions used so far during display of this page. |
void |
collectTranslationsForEditing(E4TranslationsVec v,
E4ServletImplementation_Intf servlet)
Build a list (Vector) with text definitions used so far during display of this page for translations |
java.lang.String |
debugToString(int n)
Debug only, prints out a structure tree about the object dependencies. |
E4HtmlElement_Intf |
findElement(java.lang.Class clazz,
boolean deeper)
Find any element in the element vector by the given clazz. |
E4HtmlElement_Intf |
findElement(int id,
boolean deeper)
Find an element in the element vector by the given id. |
java.util.Enumeration |
getElements()
Deprecated. |
E4ElementsVec |
getElementsVec()
The elements Vector. |
E4InputField_Intf |
getField(E4InputFieldName_Intf fieldname)
Get the associated object for the specified field. |
int |
getId()
Returns the unique identification id for this element. |
java.lang.String |
getStringContent()
Get the pure string content of the elements and sub elements, without any tag information. |
boolean |
isContentClass()
This function returns false always, except for the collecting class E4HtmlContent which is a special case. |
void |
removeAll()
Remove all elements |
void |
removeElementById(int id)
Remove an element by it's ID |
void |
removeElements(java.lang.Class clazz)
Remove all elements after and including a specified class. |
void |
set_e4sID(E4ID parent_id)
Define the parent E4ID |
void |
setId(int id)
Sets a unique identification id for this element. |
void |
setReadOnly(boolean displayonly)
Run throught all child elements recursivly, and if those elements implement interface E4InputField_Intf then
set them to read-only state. |
void |
setValue(E4CgiParams params)
Run throught all child elements recursivly, and if those elements implement interface E4InputField_Intf then
store the parameter. |
void |
toHtml_hidden(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
|
void |
toHtml(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
Create the HTML output for this element. |
boolean |
validate(E4CgiParams params,
E4ServletImplementation_Intf servlet)
Run throught all child elements, and if those elements implement interface E4InputField_Intf then
store the parameter and execute the E4InputField_Intf.validate() function. |
| Method Detail |
|---|
java.util.Enumeration getElements()
getElementsVec()E4ElementsVec getElementsVec()
E4HtmlElement_Intf findElement(int id,
boolean deeper)
id - the unique id to look for. Note that most elements
have a value of -1 if undefined, and that there could be
multiple elements having the same id (in this case, the first
one is returned).deeper - true: run throught the whole hirachy, false only the current level of child elements
getId(),
setId(int),
#findElement(Class)
E4HtmlElement_Intf findElement(java.lang.Class clazz,
boolean deeper)
throws java.lang.Exception
clazz - the class of the element to look fordeeper - true: run throught the whole hirachy, false only the current level of child elements
java.lang.Exception#findElement(int)
void collectScripts(E4ScriptsVec vec,
E4ServletImplementation_Intf servlet)
vec - collect the names of all scriptsservlet - the servlet contextvoid addScript(E4JavaScript_Intf scriptname)
scriptname - the script to add
void addScript(E4JavaScript_Intf scriptname,
boolean replace)
scriptname - the script to addreplace - false: if the script already exists, it is not changed
true: in any case the script will be replaced.
void addScript(E4HtmlElement_Intf element,
E4ServletImplementation_Intf servlet)
E4JavaScript_Intf entries of the specified element
to the current element. This normally happens automatically, as long as
HTML elements are linked together using the E4HtmlElement.addElement(e4s.html.E4HtmlElement_Intf)
function. But in some cases, this might not be the case but scripts are required
in the above element. Propably, this method shall be called after toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf)
as scripts might be added in there latley.
element - element where the scripts shall be taken fromservlet - the servlet contextaddScript(E4JavaScript_Intf),
addScript(E4JavaScript_Intf,boolean),
e4s.html.E4HtmlElement_Intf#collectScripts...
void toHtml(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
throws java.lang.Exception
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.
servlet - the servlet environment currently running in
java.lang.Exception
void toHtml_hidden(E4StringBufferHtml buf,
E4ServletImplementation_Intf servlet)
throws java.lang.Exception
java.lang.Exceptionboolean isContentClass()
java.lang.String debugToString(int n)
void removeAll()
void setId(int id)
id - the unique identificatin id#findElement(int),
removeElementById(int),
getId()int getId()
#findElement(int),
setId(int)void set_e4sID(E4ID parent_id)
parent_id - the E4ID to be set
void collectStylesForEditing(E4StylesHash v,
E4ServletImplementation_Intf servlet)
v - the Vector where the styles will be collectedservlet - the servlet contextE4ServletImplementation_Intf.sessionCanEditStyles()
void collectTranslationsForEditing(E4TranslationsVec v,
E4ServletImplementation_Intf servlet)
v - the Vector where the translations will be collectedservlet - the servlet contextE4ServletImplementation_Intf.sessionCanEditTranslations()
boolean validate(E4CgiParams params,
E4ServletImplementation_Intf servlet)
throws java.lang.Exception
E4InputField_Intf then
store the parameter and execute the E4InputField_Intf.validate() function.
params - the current cgi parameters
java.lang.ExceptionE4InputField_Intf.validate()void setValue(E4CgiParams params)
E4InputField_Intf then
store the parameter.
params - the current cgi parametersE4InputField_Intf.setValue(e4s.html.E4CgiParams),
#validate(e4s.html.E4CgiParams)E4InputField_Intf getField(E4InputFieldName_Intf fieldname)
fieldname - the name of the field
void removeElements(java.lang.Class clazz)
clazz - the class to be removed#removeElements()void removeElementById(int id)
id - the ID of the element.setId(int)void setReadOnly(boolean displayonly)
E4InputField_Intf then
set them to read-only state.
displayonly - true sets the display-only modeE4InputField_Intf.setReadOnly(boolean)java.lang.String getStringContent()
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||