forms
[ class tree: forms ] [ index: forms ] [ all elements ]

Class: HTMLSelect

Source Location: /forms/items/HTMLSelect.class.php

Class Overview

ABSTObject
   |
   --ABSTHTMLTag
      |
      --ABSTHTMLFormItem
         |
         --HTMLSelect

A class to generate select fields.


Author(s):

Version:

  • 0.3.45

Copyright:

  • Copyright (C) 2003 Daniel Plücken <daniel@debakel.net>

    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

    This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Variables

Methods


Child classes:

DBKeySelect
FileSelect
A class to generate select fields to choose a file on the filesystem.

Inherited Variables

Inherited Methods

Class: ABSTHTMLFormItem

ABSTHTMLFormItem::addValue()
Concats the given string to the value of this item's "value"-attribute.
ABSTHTMLFormItem::disable()
Disables this item. This method is an alias for the method setDisabled().
ABSTHTMLFormItem::enable()
Enables this item. This method is an alias for the method setDisabled().
ABSTHTMLFormItem::getCheckOrder()
Blind method cause other objects will invoke it.
ABSTHTMLFormItem::getLabel()
Returns the label to the extended extended underlying form component as string.
ABSTHTMLFormItem::getValidationOrder()
Blind method cause other objects will invoke it.
ABSTHTMLFormItem::getValue()
Returns the value of this item's "value"-attribute.
ABSTHTMLFormItem::HTMLFormItem()
Constructor
ABSTHTMLFormItem::setDisabled()
Disables this item.
ABSTHTMLFormItem::setEnabled()
Enables this item.
ABSTHTMLFormItem::setLabel()
Stores the given label object to the extended underlying form component.
ABSTHTMLFormItem::setManipulateable()
Makes sure that this item is manipulateable by the user.
ABSTHTMLFormItem::setNotManipulateable()
Makes sure that this item is not manipulateable by the user, but carrys the value trough the form.
ABSTHTMLFormItem::setParentForm()
Stores a reference to the form-object that contains this item-object.
ABSTHTMLFormItem::setValue()
Stores the value of this item's "value"-attribute.

Class: ABSTHTMLTag

ABSTHTMLTag::getId()
Returns the value of this tag's "id"-attribute.
ABSTHTMLTag::getName()
Returns the value of this tag's "name"-attribute.
ABSTHTMLTag::HTMLTag()
The Constructor let the script die, cause this is an abstract class!
ABSTHTMLTag::idExists()
Stores all used ids and makes sure that every id in the document is unique. It should called in every get method of classes in the packages forms and html.
ABSTHTMLTag::setAttributes()
This method allows to set the attributes of the tag that are not handled by other methods.
ABSTHTMLTag::setFreeStyle()
Set the value of style definitions that are not handled by implemented methods.
ABSTHTMLTag::setId()
Stores the value of this item's "id"-attribute.
ABSTHTMLTag::setName()
Stores the value of this tag's "name"-attribute.
ABSTHTMLTag::setNoFormat()
Stores that the HTML-elements should not format by "\r\n" in the source.
ABSTHTMLTag::setOnBlur()
Sets the value of the blur-attribute of this html-tag.
ABSTHTMLTag::setOnClick()
Sets the value of the click-attribute of this html-tag.
ABSTHTMLTag::setOnFocus()
Sets the value of the focus-attribute of this html-tag.
ABSTHTMLTag::setOnMouseMove()
Sets the value of the mousemove-attribute of this html-tag.
ABSTHTMLTag::setOnMouseOut()
Sets the value of the mouseout-attribute of this html-tag.
ABSTHTMLTag::setOnMouseOver()
Sets the value of the mouseover-attribute of this html-tag.
ABSTHTMLTag::setOnMouseUp()
Sets the value of the mouseup-attribute of this html-tag.
ABSTHTMLTag::setStyle()
Set the value of the class-attribute of this tag.

Class: ABSTObject

ABSTObject::printComplexData()
Prints out the more complex data by the given array.
ABSTObject::printPrimitiveData()
Prints out the primitive data by the given arrays.
ABSTObject::printStructure()
Prints out the Structure of this Object.
ABSTObject::same()
Checks whether the passed object reference points to this object.
ABSTObject::sameReferences()
Compares two references whether they points to the same object

Class Details

[line 69]
A class to generate select fields.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  0.3.45
copyright:  

Copyright (C) 2003 Daniel Plücken <daniel@debakel.net>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

license:  GNU Lesser General Public License


[ Top ]


Class Variables

$charset =  "ISO-8859-15"

[line 77]

The charset to be used on option-labels



Tags:

access:  private

Type:   string


[ Top ]

$do_not_disable =  false

[line 145]

This attribute is to prevent errors if the class MultRelationSelect is used. If it is set to true the disabling of this item is not possible.



Tags:

access:  private

Type:   string


[ Top ]

$freestyle_arr = array()

[line 97]



Tags:

access:  private

Type:   array


[ Top ]

$label_arr = array()

[line 82]



Tags:

access:  private

Type:   array


[ Top ]

$multiple =  false

[line 117]



Tags:

access:  public

Type:   boolean


[ Top ]

$on_change_order =

[line 102]



Tags:

access:  public

Type:   array


[ Top ]

$show_despite_zero_label_count =  false

[line 132]



Tags:

access:  public

Type:   boolean


[ Top ]

$show_standard_label =  false

[line 107]



Tags:

access:  public

Type:   array


[ Top ]

$show_standard_label_on_single_value =  true

[line 127]



Tags:

access:  private

Type:   integer


[ Top ]

$size =  1

[line 122]



Tags:

access:  private

Type:   integer


[ Top ]

$standard_label =  STANDARD_LABEL

[line 112]



Tags:

access:  private

Type:   array


[ Top ]

$str_single_value_template =  ""

[line 152]

Enter description here...



Tags:

access:  public

Type:   string


[ Top ]

$style_class_arr = array()

[line 92]



Tags:

access:  private

Type:   array


[ Top ]

$text_on_hidden =  ""

[line 137]



Tags:

access:  public

Type:   string


[ Top ]

$value_arr = array()

[line 87]



Tags:

access:  private

Type:   array


[ Top ]



Class Methods


static method getJS2getAllValuesFrom [line 855]

static string getJS2getAllValuesFrom( [boolean $withJSdeclaration = true])

Returns an javascript-function to get all values from a given select as an array.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.15
since:  0.2.0
access:  public


Parameters:

boolean   $withJSdeclaration  

[ Top ]

static method getJS2getSelectedOption [line 810]

static string getJS2getSelectedOption( [boolean $withJSdeclaration = true])

Returns an javascript-function to get the selectedoption-object of a given select.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.02
since:  0.3.4
access:  public


Parameters:

boolean   $withJSdeclaration  

[ Top ]

static method getJS2getSelectedValue [line 765]

static string getJS2getSelectedValue( [boolean $withJSdeclaration = true])

Returns an javascript-function to get the value of a given select.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.02
since:  0.1.8
access:  public


Parameters:

boolean   $withJSdeclaration  

[ Top ]

static method getJS2moveItem [line 947]

static string getJS2moveItem( [boolean $withJSdeclaration = true])

Returns an javascript-function to move the selected items of a select to another.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.02
since:  0.1.9
access:  public


Parameters:

boolean   $withJSdeclaration  

[ Top ]

static method getJS2selectValue [line 903]

static string getJS2selectValue( [boolean $withJSdeclaration = true])

Returns an javascript-function to get the value of a given select.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.11
since:  0.1.8
access:  public


Parameters:

boolean   $withJSdeclaration  

[ Top ]

constructor HTMLSelect [line 170]

HTMLSelect HTMLSelect( [string $name = "select"], [array $label_arr = array()], [array $value_arr = array()], [string $selected_value = ""], [string $on_change_order = ""], [string $show_standard_label = true], [string $show_standard_label_on_single_value = true])

Constructor



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.2
since:  0.1.0
access:  public


Parameters:

string   $name  
array   $label_arr  
array   $value_arr  
string   $selected_value  
string   $on_change_order  
string   $show_standard_label  
string   $show_standard_label_on_single_value  

[ Top ]

method addOption [line 343]

void addOption( string $value, string $label)

Adds an option to this this select.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.2.1
access:  public


Parameters:

string   $value  
string   $label  

[ Top ]

method addOptionAt [line 363]

boolean addOptionAt( string $value, string $label, string $position)

Adds an option to this this select at a specified position.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.2.35
access:  public


Parameters:

string   $value  
string   $label  
string   $position   Has to be greater then zero!

[ Top ]

method get [line 1022]

string get( )

Returns a generated string based on the attributes of this object.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  2.39
since:  0.1.0
access:  public


[ Top ]

method getChangeOrder [line 641]

string getChangeOrder( )

Returns the javascript that should execute if the value this select changes.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.2
access:  public


[ Top ]

method getCheckOrder [line 670]

string getCheckOrder( )

Returns an if-order of a javascript to check whether this item is NOT filled



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.7
access:  public


Overrides ABSTHTMLFormItem::getCheckOrder() (Blind method cause other objects will invoke it.)

[ Top ]

method getClone [line 541]

void getClone( string $newName, [mixed $selectedValue = false], [string $on_change_order = false])

Returns a clone of this object.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.2
access:  public


Overridden in child classes as:

FileSelect::getClone()
Returns a clone of this object.

Parameters:

string   $newName  
mixed   $selectedValue  
string   $on_change_order  

[ Top ]

method getLabelArr [line 580]

array getLabelArr( )

Returns the array containing the labels of this select.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.2
access:  public


[ Top ]

method getPHPSource [line 689]

string getPHPSource( )

Generates the sourcecode to build this object and returns it.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.0
access:  public


[ Top ]

method getSelectedLabel [line 608]

string getSelectedLabel( )

Returns the selected label of this select.



Tags:

version:  1.01
since:  0.1.2
access:  public


[ Top ]

method getSelectedValue [line 626]

string getSelectedValue( )

Returns the selected value of this select.



Tags:

version:  1.0
since:  0.1.2
access:  public


[ Top ]

method getStandardLabel [line 655]

string getStandardLabel( )

Returns the standard label of this select.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.2
access:  public


[ Top ]

method getValueArr [line 594]

array getValueArr( )

Returns the array containing the valuess of this select.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.2
access:  public


[ Top ]

method setAlternativeTextOnHidden [line 395]

void setAlternativeTextOnHidden( $string, string $value, string $label)

Set the text that should appear if the select is hidden, cause of zero count of options.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.2.6
access:  public


Parameters:

string   $value  
string   $label  
   $string  

[ Top ]

method setChangeOrder [line 259]

void setChangeOrder( string $string)

Sets the javascript that should execute if the value of the select changes



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.2
access:  public


Parameters:

string   $string  

[ Top ]

method setCharset [line 207]

void setCharset( string $string)

Sets the charset for the optionlabels of this select.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
see:  http://www.php.net/manual/en/function.html-entity-decode.php
see:  http://www.php.net/manual/en/function.htmlentities.php
since:  0.3.3
access:  public


Parameters:

string   $string  

[ Top ]

method setFreeStyles [line 327]

void setFreeStyles( array $array)

Sets the style attributes of the options of this select in order to the given array.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.3.2
access:  public


Parameters:

array   $array  

[ Top ]

method setLabels [line 274]

void setLabels( array $stringArray)

Sets the labels of this select in order to the given array.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


Parameters:

array   $stringArray  

[ Top ]

method setMultiple [line 434]

void setMultiple( )

Sets this select to be able in selecting multiple values.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.9
access:  public


[ Top ]

method setSingleValueTemplate [line 524]

void setSingleValueTemplate( string $str_tpl)

If the single value template is set, then the method get() will only output the parsed template instead of the selectbox. You can use the template variable [#label#] to place the single label in the template string.



Tags:

version:  1.0
since:  0.3.45
access:  public


Parameters:

string   $str_tpl  

[ Top ]

method setSize [line 409]

void setSize( $int)

Sets the size-attribute of this select.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.9
access:  public


Parameters:

   $int  

[ Top ]

method setStandardLabel [line 450]

void setStandardLabel( string $string)

Sets the label of this select that schould be shown if no value is selected.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.1
access:  public


Parameters:

string   $string  

[ Top ]

method setStyles [line 311]

void setStyles( array $array)

Sets the style classes of the options of this select in order to the given array.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.3.2
access:  public


Parameters:

array   $array  

[ Top ]

method setValues [line 289]

void setValues( array $array)

Sets the values of this select in order to the given array.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.0
access:  public


Parameters:

array   $array  

[ Top ]

method showAltoughOnZeroLabelCount [line 502]

void showAltoughOnZeroLabelCount( [boolean $boolean = true])

Sets whether the select schould be shown if no value is presented on it.



Tags:

version:  1.0
since:  0.2.5
access:  public


Parameters:

boolean   $boolean  

[ Top ]

method showStandardLabel [line 467]

void showStandardLabel( boolean $boolean, [boolean $show_standard_label_on_single_value = true])

Sets whether the standardlabel of this select schould be shown if no value is selected to.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.2
since:  0.1.1
access:  public


Parameters:

boolean   $boolean  
boolean   $show_standard_label_on_single_value  

[ Top ]


Documentation generated on Thu, 05 Jun 2008 19:13:01 +0200 by phpDocumentor 1.4.1