Class DBLJSEditField

Description

Textual field whose contents are edited in external javascript window.

This is a textual field, but user may not edit it freely. Instead, the field implements button to call a popup window. It is supposed the HTML page in the window will contain Javascript which will create/manage "some" interface allowing user to edit the text. The script will change the values of the fields of the form in the parent window.

The field has actually two values - a hidden one and a visible one. In DBLJSEdit class the textual version is taken into account (it has _txt appended to the field name), but some descendants may actually use hidden value and use the textual one only to presend value to user.

DBLJSLCField is such a descendant of this class and it's script allows user to select value from a list of values. It also takes advantage of the hidden field - the hidden field is set to ID if the record, textual field to its description.

Located in /DBLJSEditField.php (line 30)

DBLField
   |
   --DBLJSEditField
Direct descendents
Class Description
DBLJSLCField This implements another type of lookup combo field (see DBLLCField).
Variable Summary
string $editURL
int $width
Method Summary
DBLJSEditField DBLJSEditField (string $name, mixed $titleTxt, string $titleHTML, int $width, string $editURL)
void acceptValue (mixed $value, mixed &$err, mixed &$r, mixed $new)
void formatEdit (mixed $value, mixed &$r, mixed $dataSource, mixed $formName)
void formatFilter (mixed $value, mixed &$r, mixed $formName)
string getText (string $id, array &$r, int $dataSource)
Variables
string $editURL (line 39)
  • var: URL to open when user clicks on the edit button. Parameters will be added after the URL, so it must end either with ? or &. The parameters are:
    • name - Name of the field to be edited
    • formName - Name of the form the field is in
    • value - Current value
int $width (line 43)
  • var: Witdh of the text box (in characters)

Inherited Variables

Inherited from DBLField

DBLField::$addAsterixes
DBLField::$allowEmpty
DBLField::$computed
DBLField::$dbName
DBLField::$default
DBLField::$detailAttributes
DBLField::$detailPostfix
DBLField::$detailPrefix
DBLField::$editAttributes
DBLField::$editPostfix
DBLField::$editPrefix
DBLField::$filterAttributes
DBLField::$filterPostfix
DBLField::$filterPrefix
DBLField::$indexAttributes
DBLField::$indexPostfix
DBLField::$indexPrefix
DBLField::$lookupField
DBLField::$name
DBLField::$needsMultipart
DBLField::$noOrderByTitle
DBLField::$readOnly
DBLField::$referenceURL
DBLField::$titleHTML
DBLField::$titleTxt
DBLField::$widgetAttributes
Methods
Constructor DBLJSEditField (line 54)

Constructor.

DBLJSEditField DBLJSEditField (string $name, mixed $titleTxt, string $titleHTML, int $width, string $editURL)
  • string $name: Field name. See DBLField.
  • string $titleHTML: Field HTML title. See DBLField.
  • int $width: Width of the text field.
  • string $editURL: See editURL property.
acceptValue (line 105)
void acceptValue (mixed $value, mixed &$err, mixed &$r, mixed $new)

Redefinition of:
DBLField::acceptValue()
Accept value from post.

Redefined in descendants as:
formatEdit (line 81)
void formatEdit (mixed $value, mixed &$r, mixed $dataSource, mixed $formName)

Redefinition of:
DBLField::formatEdit()
Format field for record edit form.
formatFilter (line 97)
void formatFilter (mixed $value, mixed &$r, mixed $formName)

Redefinition of:
DBLField::formatFilter()
Format field for the filter form.
getText (line 76)

Internal - convert field id to text.

This method is used by other methods to convert ID to textual representation. It just returns the ID in DBLJSEditField, but it may be overriden in descendants. DBLJSLCField does this.

  • return: Textual value corresponding to the ID.
string getText (string $id, array &$r, int $dataSource)
  • string $id: ID to convert.
  • array $r: Associative array of strings - the record (database row) that this ID is part of.
  • int $dataSource: Data source type of the record - one od the DBL_DS_* constants.

Redefined in descendants as:

Inherited Methods

Inherited From DBLField

DBLField::DBLField()
DBLField::acceptFilterValue()
DBLField::acceptValue()
DBLField::addCondition()
DBLField::checkValue()
DBLField::formatDetail()
DBLField::formatEdit()
DBLField::formatFilter()
DBLField::formatIndex()
DBLField::jsCheck()
DBLField::setTitle()
DBLField::splitValue()

Documentation generated on Mon, 6 Sep 2004 21:57:09 +0200 by phpDocumentor 1.2.3