name = $name; $this->value = $value; } function setColumns($value) { $this->mColumns = $value; } function getColumns() { return $this->mColumns; } function setRows($value) { $this->mRows = $value; } function getRows() { return $this->mRows; } function toStringControl() { if (!$this->isRenderable()) return ""; if ($this->id=="") $this->id = $this->mName; $js_maxlen = ""; $html = "\n\tname\" id=\"$this->id\""; if ($this->mColumns!="") $html .= " cols=\"$this->mColumns\""; if ($this->mRows!="") $html .= " rows=\"$this->mRows\""; if ($this->mMaxLength!="") { if ($this->mOnKeyPress) $this->mOnKeyPress .= ";"; $this->mOnKeyPress .= "return validateMaxLenght_".$this->name."(this, event);"; $js_maxlen = $this->getExtraScript(); $html .= " maxlength=\"$this->mMaxLength\""; } if ($this->mStyle!="") $html .= " style=\"$this->mStyle\""; if ($this->mOnKeyPress) { $html .= " onkeypress=\"$this->mOnKeyPress\""; } $html .= ">".htmlspecialchars($this->getValue()).""; if ($js_maxlen) $html = $js_maxlen."\n".$html; return $html; } function getExtraScript() { $s = "\n"; return $s; } }