www.element4solution.com

e4s.html.editing
Class E4EditingFrameset

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.FRAMESET
                      extended by e4s.html.editing.E4EditingFrameset
All Implemented Interfaces:
E4HtmlElement_Intf

public class E4EditingFrameset
extends FRAMESET
implements E4HtmlElement_Intf

Provides a frameset for editing of database table contents, making use of E4EditingElement. A detailed description can be found at E4EditingElement.

Since:
JDK 1.4
See Also:

Example_Editing_02.java


Nested Class Summary
 
Nested classes/interfaces inherited from class e4s.html.FRAMESET
FRAMESET.E4FrameException
 
Field Summary
static int TOOLBAR_FRAME_HEIGHT
          Frame height for the toolbar.
 
Fields inherited from class e4s.html.FRAMESET
_FRAMESET_COLS, _FRAMESET_ROWS, COLS, ROWS, TIMEOUT_KEEPALIVE_REFRESH
 
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
E4EditingFrameset(E4DBTableName persistantObjId, E4ServletImplementation_Intf servlet)
           
E4EditingFrameset(E4ID parent_id, E4DBTableName persistantObjId, E4ServletImplementation_Intf servlet)
           
E4EditingFrameset(E4ID parent_id, E4String persistantObjId, E4ServletImplementation_Intf servlet)
           
E4EditingFrameset(E4ID parent_id, java.lang.String persistantObjId, E4ServletImplementation_Intf servlet)
           
E4EditingFrameset(E4ServletImplementation_Intf servlet)
          Create an editing frameset which uses an 'E' followed by an incremental integer value as identifier.
E4EditingFrameset(E4String persistantObjId, E4ServletImplementation_Intf servlet)
           
E4EditingFrameset(java.lang.String persistantObjId, E4ServletImplementation_Intf servlet)
          Create an editing frameset which uses a specified identifier.
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
 void addAdditionalButton(E4Method mref, IMG image, java.lang.String alt)
           
 void collectTranslationsForEditing(E4TranslationsVec v, E4ServletImplementation_Intf servlet)
          Build a list (Vector) with translation texts used so far during display of this page.
 E4EditingDataDescriptor createDataDescriptor()
          Create and associate the specified E4EditingDataDescriptor with the E4EditingElement.
 void enableLayoutProperties(boolean mode)
          Disable the layout properties (show all columns with their default names as labels).
 E4EditingElement getEditingElement()
           
 java.lang.String getXmlLayoutFile()
          Get the name for the XML descriptor file.
 boolean isAjax()
           
 boolean isFramesetVertical()
          Get the frameset layout of this editing element.
 void resetFormatter()
           
 void setActionSearch(E4Method mref)
           
 void setActionSearchReset(E4Method mref)
           
 void setActionSort(E4Method mref, E4ServletImplementation_Intf servlet)
           
 void setAEP_EditingDataDescriptor(AEP_EditingDataDescriptor_Intf aep)
          Creates a descriptor and sets the AEP.
 void setCaptionText(E4Label_Intf text)
          Define the caption text for the editing element, which apears beside the function buttons.
 void setCaptionText(java.lang.String text)
          Define the caption text for the editing element, which apears beside the function buttons.
 void setColor_ListBorder(E4Color color)
           
 void setColor_ResizeArea(E4Color color)
           
 void setColor_ToolbarBackground(E4Color color)
           
 void setColor_ToolbarCaption(E4Color color)
           
 void setDataDescriptor(E4EditingDataDescriptor descriptor)
          Associate the specified E4EditingDataDescriptor with the E4EditingElement.
 void setDisplayBlockLength(int length)
           
 void setDisplayIndex(boolean mode)
          Enables the display of an index table (one entry for each page).
 void setDisplayRowCounter(boolean mode)
          Enables the display of a row-counter.
 void setEditingOnly(E4EditingElement.E4EditingElementOnlyEditing param)
          Define parameters and the editing mode to enable using ONLY the editing frameset, without having any navigation frames or selection table.
 void setEditingSelection(E4DBSelect_Intf selector)
          Sets the selection object, that is the object that contains data and enables filtering and sorting.
 void setFormatter(E4EditingFormatter_Intf formatter)
           
 void setFramesetVertical(boolean mode)
          Set the frameset layout of this editing element.
 void setImageAdd(IMG add, boolean active)
           
 void setImageCancel(IMG cancel, boolean active)
           
 void setImageLast(IMG last, boolean active)
           
 void setImageNext(IMG next, boolean active)
           
 void setImagePrev(IMG prev, boolean active)
           
 void setImageReload(IMG reload, boolean active)
           
 void setImageSave(IMG save, boolean active)
           
 void setImageSearch(IMG search, boolean active)
           
 void setImageSearchReset(IMG search_reset, boolean active)
           
 void setImageSettings(IMG settings)
           
 void setImageStart(IMG start, boolean active)
           
 void setTranslationType_Sys()
           
 void setTranslationType(int translation_type)
           
 void setXmlLayoutFile(java.lang.String filename)
          Optionally, sets the name for the XML descriptor file.
 void toHtml(E4StringBufferHtml buf, E4ServletImplementation_Intf servlet)
          General about FRAMES/FRAMESET: A FRAMESET is once derived from class HTML, the next FRAMESET can be derived from FRAMESET.
 void useAjax(boolean mode)
           
 
Methods inherited from class e4s.html.FRAMESET
_createKeepAliveScript, addKeepAliveScript, collectScripts, createEventHandler, createEventHandler, eventHandlers, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAME, FRAMESET, FRAMESET, FRAMESET, FRAMESET, FRAMESET, getFrameborder, getFrameSize, getFramespacing, MenuFrameset, MenuFrameset, onLoad, onUnLoad, onUnLoad, setEventHandler, setFrameborder, setFramespacing, SmoothResize, SmoothResize, SmoothResize2
 
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, 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, validate
 
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, 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.E4HtmlElement_Intf
addScript, addScript, addScript, collectScripts, collectStylesForEditing, debugToString, findElement, findElement, getElements, getElementsVec, getField, getId, getStringContent, isContentClass, removeAll, removeElementById, removeElements, set_e4sID, setId, setReadOnly, setValue, toHtml_hidden, validate
 

Field Detail

TOOLBAR_FRAME_HEIGHT

public static final int TOOLBAR_FRAME_HEIGHT
Frame height for the toolbar.

See Also:
Constant Field Values
Constructor Detail

E4EditingFrameset

public E4EditingFrameset(E4ServletImplementation_Intf servlet)
Create an editing frameset which uses an 'E' followed by an incremental integer value as identifier. Each Editing Frameset needs an unique identifier, this function assigns such an unique identifier but this can cause the application to be more memory consuming. So it is recommended, to define one identifier for each frameset used, so if a frameset is created next time the identifier overwrites the previous one.

Parameters:
servlet - the servlet context
See Also:
E4EditingFrameset(String,e4s.servlet.E4ServletImplementation_Intf)

E4EditingFrameset

public E4EditingFrameset(java.lang.String persistantObjId,
                         E4ServletImplementation_Intf servlet)
Create an editing frameset which uses a specified identifier.

Parameters:
persistantObjId - the identifier for the persistance
servlet - the servlet context

E4EditingFrameset

public E4EditingFrameset(E4ID parent_id,
                         java.lang.String persistantObjId,
                         E4ServletImplementation_Intf servlet)

E4EditingFrameset

public E4EditingFrameset(E4String persistantObjId,
                         E4ServletImplementation_Intf servlet)

E4EditingFrameset

public E4EditingFrameset(E4ID parent_id,
                         E4String persistantObjId,
                         E4ServletImplementation_Intf servlet)

E4EditingFrameset

public E4EditingFrameset(E4DBTableName persistantObjId,
                         E4ServletImplementation_Intf servlet)

E4EditingFrameset

public E4EditingFrameset(E4ID parent_id,
                         E4DBTableName persistantObjId,
                         E4ServletImplementation_Intf servlet)
Method Detail

isFramesetVertical

public boolean isFramesetVertical()
Get the frameset layout of this editing element. Normally, the mode is vertical which means, that there are two frames (one left, one right) and the left frame contains the list, the right frame contains editing stuff. This can be changed using setFramesetVertical(boolean).

Returns:
true (default) if the frameset is vertical.
See Also:
setFramesetVertical(boolean), E4EditingElement.isFramesetVertical()

setFramesetVertical

public void setFramesetVertical(boolean mode)
Set the frameset layout of this editing element. Normally, the mode is vertical which means, that there are two frames (one left, one right) and the left frame contains the list, the right frame contains editing stuff.

Parameters:
mode - true (default) uses the vertical frameset
See Also:
isFramesetVertical(), E4EditingElement.setFramesetVertical(boolean)

setCaptionText

public void setCaptionText(java.lang.String text)
Define the caption text for the editing element, which apears beside the function buttons.

See Also:
E4EditingElement.setCaptionText( String )

setCaptionText

public void setCaptionText(E4Label_Intf text)
Define the caption text for the editing element, which apears beside the function buttons.

See Also:
E4EditingElement.setCaptionText( String )

setColor_ResizeArea

public void setColor_ResizeArea(E4Color color)

setColor_ListBorder

public void setColor_ListBorder(E4Color color)

setColor_ToolbarCaption

public void setColor_ToolbarCaption(E4Color color)

setColor_ToolbarBackground

public void setColor_ToolbarBackground(E4Color color)

setEditingSelection

public void setEditingSelection(E4DBSelect_Intf selector)
                         throws java.lang.Exception
Sets the selection object, that is the object that contains data and enables filtering and sorting. It is important, when you use formatters to declare them before using this function!

Parameters:
selector - a selection object
Throws:
java.lang.Exception
See Also:
E4EditingElement.getEditingSelection(), e4s.html.editing.E4EditingElement#setEditingSelection()

setDisplayBlockLength

public void setDisplayBlockLength(int length)

setDisplayRowCounter

public void setDisplayRowCounter(boolean mode)
Enables the display of a row-counter. A row-counter is just a column in the table with incremental numbers, starting with 1 at each block. It is always displayed as the first column in the table. Sorting does not influence the row counter.

Parameters:
mode - enables (true) or disables (false) the display of the row counter
See Also:
#e4s.html.editing.EditingElement#setDisplayRowCounter, #e4s.html.editing.EditingElement#getDisplayRowCounter

setDisplayIndex

public void setDisplayIndex(boolean mode)
Enables the display of an index table (one entry for each page). An index is a table with a cell displaying a block number, starting with 1, up to the number of blocks. When the user clicks on one of those, then this particular block is displayed.

Parameters:
mode - enables (true) or disables (false) the display of the index
See Also:
#e4s.html.editing.EditingElement#getDisplayIndex, #e4s.html.editing.EditingElement#setDisplayIndex, #e4s.html.editing.EditingElement#paintIndex, #e4s.application.sysmodule.editing.moduleEditingHandling01#moveSelected

setImagePrev

public void setImagePrev(IMG prev,
                         boolean active)

setImageNext

public void setImageNext(IMG next,
                         boolean active)

setImageStart

public void setImageStart(IMG start,
                          boolean active)

setImageLast

public void setImageLast(IMG last,
                         boolean active)

setImageAdd

public void setImageAdd(IMG add,
                        boolean active)

setImageSave

public void setImageSave(IMG save,
                         boolean active)

setImageCancel

public void setImageCancel(IMG cancel,
                           boolean active)

setImageReload

public void setImageReload(IMG reload,
                           boolean active)

setImageSettings

public void setImageSettings(IMG settings)

setImageSearch

public void setImageSearch(IMG search,
                           boolean active)

setImageSearchReset

public void setImageSearchReset(IMG search_reset,
                                boolean active)

setActionSort

public void setActionSort(E4Method mref,
                          E4ServletImplementation_Intf servlet)

setActionSearch

public void setActionSearch(E4Method mref)

setActionSearchReset

public void setActionSearchReset(E4Method mref)

setDataDescriptor

public void setDataDescriptor(E4EditingDataDescriptor descriptor)
Associate the specified E4EditingDataDescriptor with the E4EditingElement.

Parameters:
descriptor - the data desccriptor
servlet - the servlet's context
See Also:
createDataDescriptor()

createDataDescriptor

public E4EditingDataDescriptor createDataDescriptor()
Create and associate the specified E4EditingDataDescriptor with the E4EditingElement.

Parameters:
servlet - the servlet's context
See Also:
setDataDescriptor(e4s.html.editing.E4EditingDataDescriptor)

setFormatter

public void setFormatter(E4EditingFormatter_Intf formatter)

resetFormatter

public void resetFormatter()

toHtml

public void toHtml(E4StringBufferHtml buf,
                   E4ServletImplementation_Intf servlet)
            throws java.lang.Exception
Description copied from class: FRAMESET
General about FRAMES/FRAMESET: A FRAMESET is once derived from class HTML, the next FRAMESET can be derived from FRAMESET. A FRAMESET consists of FRAME (which is a subclass of HTML) or again a FRAMESET. When a FRAME is used, when it is converted into Html using the FRAMESET.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) function, for each <FRAME>-tag a URL pattern is created, using the E4ServletImplementation_Intf.PARAM_PRESERVED with an generic unique ID (based on the time and m_random). Instead of printing out the content of the frame itself, a link is generated in the <FRAME SRC="..">-tag. The content of the frame is stored using the function E4ServletImplementation_Intf.writePreserved(String,E4HtmlElement_Intf). In the servlet main routine (typically the doPost() or doGet() method this code should be used to handle this URL requests: if (! servlet.writePreservedOut()) { // continue with execution }

Specified by:
toHtml in interface E4HtmlElement_Intf
Overrides:
toHtml in class FRAMESET
servlet - use the getServlet() to get the current servlet context
Throws:
java.lang.Exception

getEditingElement

public E4EditingElement getEditingElement()

enableLayoutProperties

public void enableLayoutProperties(boolean mode)
Disable the layout properties (show all columns with their default names as labels). If enabled, then the layout properties are read in from an XML file (@link e4s.html.editing.E4EditingPersistance} and the user has online capabilities to modify the layout.

Parameters:
true - means enabled (which is the default), and false means disabled
See Also:
#hasLayoutProperties()

setTranslationType

public void setTranslationType(int translation_type)

setTranslationType_Sys

public void setTranslationType_Sys()

collectTranslationsForEditing

public void collectTranslationsForEditing(E4TranslationsVec v,
                                          E4ServletImplementation_Intf servlet)
Description copied from class: E4HtmlElementGeneral
Build a list (Vector) with translation texts used so far during display of this page. Run throught all subclasses elements and collect their texts as well. Note, that a text will only be added one time. The Vector contains elements of class E4Label.

Specified by:
collectTranslationsForEditing in interface E4HtmlElement_Intf
Overrides:
collectTranslationsForEditing in class E4HtmlElementGeneral
Parameters:
v - the Vector where the styles will be collected, may not be null
servlet - the current servlet instance
See Also:
E4Label_Intf

setXmlLayoutFile

public void setXmlLayoutFile(java.lang.String filename)
Optionally, sets the name for the XML descriptor file. By default the filename is taken based on the tablename so there is no need to set this value here.

See Also:
getXmlLayoutFile(), E4EditingPersistance.getXmlFilename(e4s.html.editing.E4EditingElement), E4EditingElement.setXmlLayoutFile(String)

getXmlLayoutFile

public java.lang.String getXmlLayoutFile()
Get the name for the XML descriptor file. Normally, this file is based on the tablename and this will return null unless you specify explicit a name using setXmlLayoutFile(String).

Returns:
the name if defined
See Also:
setXmlLayoutFile(String), E4EditingPersistance.getXmlFilename(e4s.html.editing.E4EditingElement), E4EditingElement.getXmlLayoutFile()

useAjax

public void useAjax(boolean mode)

isAjax

public boolean isAjax()

_getSVNVersionString

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

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

setEditingOnly

public void setEditingOnly(E4EditingElement.E4EditingElementOnlyEditing param)
Define parameters and the editing mode to enable using ONLY the editing frameset, without having any navigation frames or selection table.


setAEP_EditingDataDescriptor

public void setAEP_EditingDataDescriptor(AEP_EditingDataDescriptor_Intf aep)
                                  throws java.lang.Exception
Creates a descriptor and sets the AEP.

Parameters:
aep - the data descriptor to be associated with the descriptor of this editing frameset
Throws:
java.lang.Exception
See Also:
createDataDescriptor(), E4EditingDataDescriptor.setAEP_EditingDataDescriptor(e4s.html.editing.AEP_EditingDataDescriptor_Intf)

addAdditionalButton

public void addAdditionalButton(E4Method mref,
                                IMG image,
                                java.lang.String alt)

www.element4solution.com