[ Index ]

PHP Cross Reference of Web Application Component Toolkit

title

Body

[close]

/framework/view/ -> formview.inc.php (summary)

(no description)

Version: $Id: formview.inc.php,v 1.10 2004/11/12 21:25:12 jeffmoore Exp $
File Size: 155 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

formview:: (10 methods):
  formview()
  findform()
  makesubview()
  preservestate()
  setmodel()
  seterrors()
  oninitial()
  onsubmitted()
  canclientvalidate()
  setclientvalidation()


Class: formview  - X-Ref

Implements TemplateView pattern for Forms.

formview($TemplateFile = NULL, $PreservedFields = array()   X-Ref
Preserved fields allow the controller to tell the view to
preserve the state of certain fields between requests.
In a form view, this usually means add hidden fields.

access: public
param: string template filename
param: array form fields to preserve

findform()   X-Ref
This only works for templates that contain a single form.

access: protected
return: void

makesubview(&$RootComponent)   X-Ref
Turn this View into a sub view in a composite view
The root component passed represents the portion of the
CompositeView's Template that this view will manage.
This component should be a dataspace component unless
special arrangements are made in subclasses of this
View class.

param: object

preservestate($PreservedFields)   X-Ref
Preserve the state of a list of fields.
Presumably by creating hidden fields in the form.

access: private
param: array of field to preserve
return: void

setmodel(&$Model)   X-Ref
Transfer values from the dataspace into the form

access: public
param: object implementing dataspace
return: void

seterrors(&$Validator)   X-Ref
Transfer a list of errors into the form.

access: private
param: Validator instance of validator or subclass
return: void

oninitial()   X-Ref
Called only on the request when the form is first displayed
This template method offers the opportunity to perform stage
specific presentation logic.

access: public
return: void

onsubmitted()   X-Ref
Called only on requests after the second one.  May never be called.
This template method offers the opportunity to perform stage
specific presentation logic.

access: public
return: void    

canclientvalidate()   X-Ref
Can this view do client side validation?

access: protected
return: boolean

setclientvalidation(&$Validator)   X-Ref
Client side validation population. This implementation sets the maxlength
attribute of input text fields. This method might be overridden for JavaScript
validation, for example.
Transfer information from the validator to the view.

access: protected
param: Validator or subclass
return: void



Generated: Sun Nov 28 19:36:09 2004 Cross-referenced by PHPXref 0.5