Sitellite Application Framework
Class Tree         Index         All Elements

Class: MF_Widget

Source Location: Program_Root/MailForm/Widget/Widget.php

Class Overview


The base class for creating form widgets. Used only for extending.


Author(s)

Version

  • 2.8, 2003-11-07, $Id: Widget.php,v 1.5 2007/01/19 01:12:30 lux Exp $

Copyright

  • Copyright (C) 2001-2003, Simian Systems Inc.

Variables

Methods


Child Classes

MF_Widget_attach
Attach widget. Implements the interface to an "attachment" component for messages. Leaves the add and remove logic to separate scripts which are called through popup windows. Used in the Sitellite Personal Workspace.
MF_Widget_calendar
Calendar widget. Displays a text box with a Javascript calendar popup to select dates. The format of the date can also be specified, but the default is YYYY-MM-DD.
MF_Widget_checkbox
Checkbox widget. Displays a list of HTML <input type="checkbox" /> form fields.
MF_Widget_date
Date widget. Displays 3 select boxes representing the year, month, and day.
MF_Widget_datetime
Datetime widget. Displays 3 select boxes representing the year, month, and day, as well as three text boxes representing the hour, minute, and second.
MF_Widget_datetimeinterval
Datetimeinterval widget. Displays 3 select boxes representing the year, month, and day, as well as three text boxes representing the hour, minute in the form of :00, :15, :30, and :45, and am/pm.
MF_Widget_dirlist
Dirlist widget. Displays a select box with a list of files from a specific folder.
MF_Widget_file
File widget. Displays an HTML <input type="file" /> form field.
MF_Widget_hidden
Hidden widget. Displays an HTML <input type="hidden" /> form field.
MF_Widget_hiddenswitch
Hiddenswitch widget. Displays no form field, but returns a value based on another field's value.
MF_Widget_image
Image widget. Displays an HTML <input type="image" /> form field.
MF_Widget_imagechooser
Imagechooser widget. Displays an HTML <input type="file" />-like form field that uses the imagechooser app.
MF_Widget_info
Info widget. Displays text and a hidden widget.
MF_Widget_msubmit
Msubmit widget (as in Multiple Submit). Displays a list of submit buttons all in a horizontal row.
MF_Widget_multiple
Multiple widget. Displays an HTML <select multiple="multiple"> form field.
MF_Widget_owner
Info widget. Displays text and a hidden widget.
MF_Widget_password
Password widget. Displays an HTML <input type="password" /> form field.
MF_Widget_radio
Radio widget. Displays an HTML <input type="radio" /> form field.
MF_Widget_radiogroup
Radiogroup widget. Displays a group of related radio widgets.
MF_Widget_reset
Reset widget. Displays an HTML <input type="reset" /> form field.
MF_Widget_section
Pseudo-Widget that displays a section header.
MF_Widget_security
Security widget. Performs a CAPTCHA test on the user.
MF_Widget_select
Select widget. Displays an HTML <select> form field.
MF_Widget_selector
Selector widget. Displays a multiple-select box with a Javascript popup to add/remove items from the list.
MF_Widget_separator
Pseudo-Widget that displays a horizontal rule.
MF_Widget_set
Set widget. Displays a text box with a select box next to it of previously entered values. This creates the equivalent of a select box that also allows new values to be entered.
MF_Widget_submit
Submit widget. Displays an HTML <input type="submit" /> form field.
MF_Widget_tab
Tab interface implementation as a widget.
MF_Widget_team
Team widget. Displays a list of teams, or an info box if you're not allowed to change the team.
MF_Widget_template
Pseudo-Widget that displays the output of a simple template.
MF_Widget_tie
Tied select widget. Ties the values of one select widget to the actions of another, allowing the option list to change dynamically based on previous choices made in the form.
MF_Widget_time
Time widget. Displays 3 select boxes which represent HH : MM : SS.
MF_Widget_timeinterval
Timeinterval widget. Displays 3 select boxes which represent the hour (1 through 12), the minutes (:00, :15, :30, and :45), and AM/PM.
MF_Widget_virtual
Pseudo-Widget that displays information from a database query or user-defined function.

Inherited Variables

Inherited Methods


Class Details

[line 104]
The base class for creating form widgets. Used only for extending.

Rules for creating custom widgets:

  • must define some field (can be a blank hidden field) with their own $w->name
  • must extend MF_Widget and must call parent::MF_Widget in their constructor method
  • must use other widgets to create "compound" or custom widgets from, and must handle the task of collecting the values of those internal widgets to expose a singular $w->data_value when requested (this is simplified, don't worry :)
  • must dynamically load any other widgets called, using the $GLOBALS['loader'] object to do so.
New in 1.2:
  • Made some clarifications in the docs regarding setValues() and setValue(), which are rather ambiguous. How to remember the difference: setValues as in ALL possible values (pleural), setValue as in THE actual value (singular).
New in 1.4:
  • Changed var $value; to var $value = array ();, so that empty fields of certain types don't show errors.
  • Added a setDefault() method which is handy for other widgets to inherit, since setting the default value might not always be as simple as setting the $default_value property.
New in 1.6:
  • Added a new $passover_isset property. Read below for details.
New in 1.8:
  • Deprecated the validation() method in favour of an addRule() method, which allows a widget to have more than one validation rule. This also allows each rule to have its own error message.
  • Added a validate() method which is called by the MailForm->invalid() method.
  • Validation rules are now their own class, called MailFormRule, which are accessed indirectly through this class. For more info, see saf.MailForm.Rule.
New in 2.0:
  • Added new methods: addRule() and validate().
  • Added new properties: $type and $rules.
  • Deprecated one method, validation(), and one property, $rule.
New in 2.2:
  • Added an $_attrs property and three new methods, attr(), unsetAttr(), and getAttrs().
  • Deprecated the $extra property in favour of the new property and methods just added. Note: Migration to these new methods is not complete in all of the widgets just yet, and $extra will still work for some time, so the $extra method should still be used right now, however new widgets may or may not support the $extra property.
New in 2.4:
  • Added a $label_template property.
New in 2.6:
  • Added an $invalid property and an invalid() method.
New in 2.8:
  • Added docs for the implied $nullable property, and made getValue() return null properly according to the $nullable setting.

1 <?php
2
3 $widget = new MF_Widget ('name');
4 $widget->addRule ('is "foo"', 'You must enter "foo" to pass!');
5 $widget->setValue ('foo');
6
7 ? >




Tags:

access:  public
version:  2.8, 2003-11-07, $Id: Widget.php,v 1.5 2007/01/19 01:12:30 lux Exp $
license:  http://www.sitellite.org/index/license
copyright:  Copyright (C) 2001-2003, Simian Systems Inc.
author:  John Luxford <mailto:lux@simian.ca>


[ Top ]


Class Variables

$advanced =  false

[line 256]

If this is set to true, the widget will be automatically hidden from users whose 'browse_level' preference isn't set to 'advanced'.



Tags:

access:  public

Type:   mixed


[ Top ]

$data_value =

[line 145]

The actual value of the widget. Could be user input value or same as $default_value.



Tags:

access:  public

Type:   mixed


[ Top ]

$default_value =

[line 128]

The default value of the widget.



Tags:

access:  public

Type:   mixed


[ Top ]

$display_value =

[line 120]

The display text of the widget.



Tags:

access:  public

Type:   mixed


[ Top ]

$form =  false

[line 237]

When a widget is attached to a form (via addWidget()), which is not always necessarily the case, then this will contain a reference to that form object.



Tags:

access:  public

Type:   mixed


[ Top ]

$invalid =  false

[line 227]

Whether this field is invalid. Used in the display() method to set class="invalid" on the field label.



Tags:

access:  public

Type:   mixed


[ Top ]

$name =

[line 112]

The name of the widget. $name is actually an alias for $_attrs['name'].



Tags:

access:  public

Type:   mixed


[ Top ]

$nullable =  false

[line 247]

Determines whether an empty value should be returned as NULL or as an empty string by getValue(). Default is the empty string, since it is common to specify NOT NULL on database tables.



Tags:

access:  public

Type:   mixed


[ Top ]

$passover_isset =  false

[line 178]

This indicates to the MailForm validation routine whether or not to

skip checking if isset() on this widget. This is useful for checkboxes, file uploads, reset buttons, multiple-choice select boxes, pseudo widgets (see the Hiddenswitch widget for an example of this), and sub-classes of these (for example, the Allow widget is a sub-class of the Checkbox widget). This is set to false by default.




Tags:

access:  public

Type:   mixed


[ Top ]

$rule =

[line 154]

The validation rule for this widget. Note: This property is deprecated in favour of the new $rules property.



Tags:

access:  public

Type:   mixed


[ Top ]

$rules = array ()

[line 197]

Contains a list of rules to apply to this widget. See saf.MailForm.Rule for more information.



Tags:

access:  public

Type:   mixed


[ Top ]

$type =

[line 188]

Contains the widget type name (ie. 'textarea' for a MF_Widget_textarea object). Used only by saf.Database.Table to keep track of things in the _makeWidget() method.



Tags:

access:  public

Type:   mixed


[ Top ]

$value = array ()

[line 136]

The possible values of the widget. Can be a string or hash.



Tags:

access:  public

Type:   mixed


[ Top ]



Class Methods


constructor MF_Widget [line 265]

MF_Widget MF_Widget( string $name)

Constructor Method.



Tags:

access:  public


Parameters:

string   $name  

[ Top ]

method addRule [line 300]

boolean addRule( string $rule, [string $msg = ''])

Adds a validation rule to the list of $rules.



Tags:

access:  public


Parameters:

string   $rule  
string   $msg  

[ Top ]

method attr [line 460]

string attr( string $key, [mixed $value = false])

This is the accessor method for setting and getting the value of

any attribute of the tag, including 'method' and 'action'. This will replace the $extra property, which is henceforth deprecated. If you call this method and provide no $value, you are using it as a 'getter', as in you are getting the current value. If you provide a value, the new value will be set, so you are acting as a 'setter'. If you simply specify that the $value be true, then it will appear filled with its own name (useful for things like the checked="checked" attribute of a checkbox input field).




Tags:

access:  public


Parameters:

string   $key  

[ Top ]

method changeType [line 524]

void changeType( mixed $newType, [mixed $extra = array ()])



[ Top ]

method display [line 437]

string display( [boolean $generate_html = 0])

Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).



Tags:

access:  public


Overridden in child classes as:

MF_Widget_attach::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_calendar::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_checkbox::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_allow::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_date::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_datetime::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_datetimeinterval::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_dirlist::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_file::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_hidden::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_image::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_imagechooser::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_info::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_msubmit::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_multiple::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_mref::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_owner::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_password::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_radio::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_radiogroup::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_reset::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_section::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_security::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_select::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_access::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_ref::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_status::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_selector::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_separator::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_set::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_submit::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_tab::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_team::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_template::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_tie::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_time::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_timeinterval::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).
MF_Widget_virtual::display()
Returns the display HTML for this widget. The optional parameter determines whether or not to automatically display the widget nicely, or whether to simply return the widget (for use in a template).

Parameters:

boolean   $generate_html  

[ Top ]

method getAttrs [line 495]

string getAttrs( )

Returns a list of all of the attributes of this object's HTML tag in a string ready to be concatenated into the actual rendered tag output.



Tags:

access:  public


[ Top ]

method getValue [line 388]

string getValue( [object $cgi = ''])

Fetches the actual value for this widget.



Tags:

access:  public


Overridden in child classes as:

MF_Widget_attach::getValue()
MF_Widget_checkbox::getValue()
Fetches the actual value for this widget.
MF_Widget_date::getValue()
Fetches the actual value for this widget.
MF_Widget_datetime::getValue()
Fetches the actual value for this widget.
MF_Widget_datetimeinterval::getValue()
Fetches the actual value for this widget.
MF_Widget_dirlist::getValue()
Fetches the actual value for this widget.
MF_Widget_hiddenswitch::getValue()
Fetches the actual value for this widget. Note: This field actual relies on a global $cgi object.
MF_Widget_image::getValue()
Fetches the actual value for this widget, which is an array with keys x and y, representing the coordinates of the mouse click of the visitor.
MF_Widget_msubmit::getValue()
Fetches the actual value for this widget.
MF_Widget_multiple::getValue()
Fetches the actual value for this widget.
MF_Widget_radiogroup::getValue()
Fetches the actual value for this widget.
MF_Widget_section::getValue()
Fetches the actual value for this widget.
MF_Widget_selector::getValue()
Fetches the actual value for this widget.
MF_Widget_separator::getValue()
Fetches the actual value for this widget.
MF_Widget_set::getValue()
Fetches the actual value for this widget.
MF_Widget_tab::getValue()
Fetches the actual value for this widget.
MF_Widget_template::getValue()
Fetches the actual value for this widget.
MF_Widget_time::getValue()
Fetches the actual value for this widget.
MF_Widget_timeinterval::getValue()
Fetches the actual value for this widget.
MF_Widget_virtual::getValue()
Fetches the actual value for this widget. Returns whatever the function or database query returns. If $column is specified, returns the value of the $column field from the first record of the database results.

Parameters:

object   $cgi  

[ Top ]

method invalid [line 517]

string invalid( )

Returns a ' class="invalid"' string if the widget's $invalid property is set to true, or an empty string otherwise.



Tags:

access:  public


[ Top ]

method setDefault [line 419]

void setDefault( string $value)

Sets the default value for the widget.



Tags:

access:  public


Overridden in child classes as:

MF_Widget_date::setDefault()
Gives this widget a default value. Accepts a date string of the format 'YYYY-MM-DD'.
MF_Widget_datetime::setDefault()
Gives this widget a default value. Accepts a date string of the format 'YYYY-MM-DD HH:MM:SS' or 'YYYYMMDDHHMMSS'.
MF_Widget_datetimeinterval::setDefault()
Gives this widget a default value. Accepts a date string of the format 'YYYY-MM-DD HH:MM:SS' or 'YYYYMMDDHHMMSS'.
MF_Widget_set::setDefault()
Gives this widget a default value. Accepts a date string of the format 'YYYY-MM-DD'.
MF_Widget_time::setDefault()
Gives this widget a default value. Accepts a time string of the format 'HH:MM:SS'.
MF_Widget_timeinterval::setDefault()
Gives this widget a default value. Accepts a time string of the format 'HH:MM:SS'.

Parameters:

string   $value  

[ Top ]

method setValue [line 372]

void setValue( [string $value = ''], [string $inner_component = ''])

Sets the *ACTUAL* value for this widget. An optional second parameter can be passed, which is unused here, but can be used in complex widget types to assign parts of a value and piece it together from multiple physical form fields.



Tags:

access:  public


Overridden in child classes as:

MF_Widget_checkbox::setValue()
Sets the actual value for this widget. An optional second parameter can be passed, which is unused here, but can be used in complex widget types to assign parts of a value and piece it together from multiple physical form fields.
MF_Widget_date::setValue()
Sets the actual value for this widget. An optional second parameter can be passed, which is unused here, but can be used in complex widget types to assign parts of a value and piece it together from multiple physical form fields.
MF_Widget_datetime::setValue()
Sets the actual value for this widget. An optional second parameter can be passed, which is unused here, but can be used in complex widget types to assign parts of a value and piece it together from multiple physical form fields.
MF_Widget_datetimeinterval::setValue()
Sets the actual value for this widget. An optional second parameter can be passed, which is unused here, but can be used in complex widget types to assign parts of a value and piece it together from multiple physical form fields.
MF_Widget_dirlist::setValue()
Sets the actual value for this widget. An optional second parameter can be passed, which is unused here, but can be used in complex widget types to assign parts of a value and piece it together from multiple physical form fields.
MF_Widget_multiple::setValue()
Sets the actual value for this widget. An optional second parameter can be passed, which is unused here, but can be used in complex widget types to assign parts of a value and piece it together from multiple physical form fields.
MF_Widget_section::setValue()
Sets the section title. The second parameter is ignored.
MF_Widget_selector::setValue()
Sets the actual value for this widget. An optional second parameter can be passed, which is unused here, but can be used in complex widget types to assign parts of a value and piece it together from multiple physical form fields.
MF_Widget_set::setValue()
Sets the actual value for this widget. An optional second parameter can be passed, which is unused here, but can be used in complex widget types to assign parts of a value and piece it together from multiple physical form fields.
MF_Widget_template::setValue()
Sets the section title. The second parameter is ignored.
MF_Widget_time::setValue()
Sets the actual value for this widget. An optional second parameter can be passed, which is unused here, but can be used in complex widget types to assign parts of a value and piece it together from multiple physical form fields.
MF_Widget_timeinterval::setValue()
Sets the actual value for this widget. An optional second parameter can be passed, which is unused here, but can be used in complex widget types to assign parts of a value and piece it together from multiple physical form fields.
MF_Widget_virtual::setValue()
Sets either the $function or $query property. If the property name is specified as $key, then $value is what it is set to, otherwise it checks to see if the $key is an existing function and if so sets $function to $key, otherwise sets $query to $key.

Parameters:

string   $value  
string   $inner_component  

[ Top ]

method setValues [line 350]

void setValues( string $key, [string $value = ''])

Sets the *POSSIBLE* values for this widget. If $value is given, sets $this->value as a hash, otherwise, as a string.

Please Note: No simple arrays allowed, or the numeric keys will be used as the value property in the HTML output.




Tags:

access:  public


Overridden in child classes as:

MF_Widget_set::setValues()
Sets the *POSSIBLE* values for this widget. Uses
MF_Widget_template::setValues()
Sets the data values to pass to the template. If $value is given, sets $this->value as a hash, otherwise, as a string.
MF_Widget_tie::setValues()
Sets the values to display for the specified value of the other widget, which is specified in $name parameter.

Parameters:

string   $key  
string   $value  

[ Top ]

method unsetAttr [line 481]

string unsetAttr( string $key)

Use this method to remove an attribute from the tag

attribute list. Use this instead of passing a false value to attr(), because a false value essentially means "return the current value" in that method. This method returns the old value of the attribute being unset.




Tags:

access:  public


Parameters:

string   $key  

[ Top ]

method validate [line 315]

boolean validate( string $value, object $form, object $cgi)

Validates the widget against its set of $rules. Returns false on failure to pass any rule.



Tags:

access:  public


Overridden in child classes as:

MF_Widget_attach::validate()
MF_Widget_msubmit::validate()
Validates the widget against its set of $rules. Returns false on failure to pass any rule.
MF_Widget_password::validate()
Validates the widget against its set of $rules. Returns false on failure to pass any rule.
MF_Widget_radiogroup::validate()
Validates the widget against its set of $rules. Returns false on failure to pass any rule.
MF_Widget_section::validate()
Validates the widget against its set of $rules. Returns false on failure to pass any rule.
MF_Widget_separator::validate()
Validates the widget against its set of $rules. Returns false on failure to pass any rule.
MF_Widget_tab::validate()
Validates the widget against its set of $rules. Returns false on failure to pass any rule.
MF_Widget_template::validate()
Validates the widget against its set of $rules. Returns false on failure to pass any rule.
MF_Widget_virtual::validate()
Validates the widget against its set of $rules. Returns false on failure to pass any rule.

Parameters:

string   $value  
object   $form  
object   $cgi  

[ Top ]

method validation [line 287]

void validation( string $rule)

Sets the validation $rule for this widget. Note: This method is deprecated and only wraps around the addRule() method anyway. Please use addRule() instead, since this method will be removed in a near-future release.



Tags:

access:  public


Parameters:

string   $rule  

[ Top ]


Copyright © 2007, SIMIAN systems Inc.
All rights reserved. Privacy policy
Documentation generated on Tue, 13 Feb 2007 17:20:15 -0600 by Sitellite AppDoc and phpDocumentor 1.2.2