www.element4solution.com

e4s.html.editing
Interface E4EditingFormatter_Intf

All Known Implementing Classes:
E4EditingFormatterDefault, E4FormatterLongText, E4ModuleEditCompany.E4FormatterBelongsTo, E4ModuleEditCompany.E4FormatterCompanyGroup, E4ModuleEditCompany.E4FormatterCompanyId, E4ModuleEditCompany.E4FormatterDateFormat, E4ModuleEditCompany.E4FormatterDecimalSign, E4ModuleEditCompany.E4FormatterGender, E4ModuleEditCompany.E4FormatterTimeFormat, E4ModuleEditVarious.E4FormatterTimeout, E4ModuleFreefieldDefinition.E4FormatterDatatype, E4ModuleFreefieldDefinition.E4FormatterDisplayMode

public interface E4EditingFormatter_Intf

A formatter enables to distinct between a displayed value and a real value. For example, the real value could be a key like 1, 2, 3 each number standing for a particular value such as red, green, blue. You want 1, 2, 3 to be stored in the database but when the field value is displayed in the editing list, instead a value of red, green or blue shall be displayed. When the user selects a value for search, this is treatened in the opposite way. A formatter needs to be instanced and handled to the e4s.html.E4EditingElement but it will be assigned to a column by an interactive input. A detailed description can be found at E4EditingElement.

Since:
JDK 1.4
See Also:
E4EditingElement, E4EditingElement.setFormatter(e4s.html.editing.E4EditingFormatter_Intf)

Method Summary
 java.lang.String formatDisplay(E4ApplObj_Intf applobj, java.lang.String value, E4DBSelect_Intf select)
          Format a String (or any value represented as String) for display.
 java.lang.String formatSearch(java.lang.String s)
          Reverse function for formatDisplay(e4s.application.E4ApplObj_Intf, java.lang.String, e4s.db.E4DBSelect_Intf), format an input to a database value for queries.
 java.lang.String getFormatterName()
          Get a name for display (selection) in the property section for the editing table.
 E4MethodPickup getMethodPickup()
          Get a method reflection to be used as pickup.
 E4SelectValues getSearchOptions()
          Return a Vector of E4SelectValues.OPTION elements for building a selection list on searching.
 

Method Detail

formatDisplay

java.lang.String formatDisplay(E4ApplObj_Intf applobj,
                               java.lang.String value,
                               E4DBSelect_Intf select)
Format a String (or any value represented as String) for display. e.g. if value contains a customer number, return the customer name.

Parameters:
applobj - a valid application object to be used for database access
value - String to be formatted. Return null, if no format is required.
select - the current database query (if necessary to retrieve other data)

formatSearch

java.lang.String formatSearch(java.lang.String s)
Reverse function for formatDisplay(e4s.application.E4ApplObj_Intf, java.lang.String, e4s.db.E4DBSelect_Intf), format an input to a database value for queries. e.g. when s is a customer name, return a customer number.


getSearchOptions

E4SelectValues getSearchOptions()
Return a Vector of E4SelectValues.OPTION elements for building a selection list on searching. e.g. create a list of containing "yes" and "no" for a boolean field.


getFormatterName

java.lang.String getFormatterName()
Get a name for display (selection) in the property section for the editing table.

Returns:
a name for the user to identify this functionality, e.g. "Customer Formatting"

getMethodPickup

E4MethodPickup getMethodPickup()
Get a method reflection to be used as pickup.


www.element4solution.com