Changeset 2402

Show
Ignore:
Timestamp:
03/12/2008 02:10:11 PM (10 months ago)
Author:
xue
Message:

Fixed #757.

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/HISTORY

    r2401 r2402  
    2626ENH: Ticket#741 - Added CDbConnection.currentTransaction property (Qiang) 
    2727ENH: Ticket#743 - Added status code header in HTTP response when in error (Qiang) 
     28ENH: Ticket#757 - TDateFormat and TNumberFormat now implement IDataRenderer (Qiang) 
    2829ENH: Ticket#783 - Added date/time type support to soap implementation (Hongliang) 
    2930ENH: Active Record supports multiple foreign references of the same table (Wei) 
  • trunk/framework/I18N/TDateFormat.php

    r1398 r2402  
    5757 * @package System.I18N 
    5858 */ 
    59 class TDateFormat extends TI18NControl 
     59class TDateFormat extends TI18NControl implements IDataRenderer 
    6060{ 
    6161        /** 
     
    161161 
    162162        /** 
     163         * Get the date-time value for this control. 
     164         * This method is required by {@link IDataRenderer}. 
     165         * It is the same as {@link getValue()}. 
     166         * @return string date time value. 
     167         * @see getValue 
     168         * @since 3.1.2 
     169         */ 
     170        public function getData() 
     171        { 
     172                return $this->getValue(); 
     173        } 
     174 
     175        /** 
     176         * Set the date-time value for this control. 
     177         * This method is required by {@link IDataRenderer}. 
     178         * It is the same as {@link setValue()}. 
     179         * @param string the date-time value. 
     180         * @see setValue 
     181         * @since 3.1.2 
     182         */ 
     183        public function setData($value) 
     184        { 
     185                $this->setValue($value); 
     186        } 
     187 
     188        /** 
    163189         * Renders the localized version of the date-time value. 
    164190         * If the culture is not specified, the default application 
  • trunk/framework/I18N/TNumberFormat.php

    r2263 r2402  
    6262  * @package System.I18N 
    6363  */ 
    64 class TNumberFormat extends TI18NControl 
     64class TNumberFormat extends TI18NControl implements IDataRenderer 
    6565{ 
    6666        /** 
     
    104104        { 
    105105                $this->setViewState('Value',$value,''); 
     106        } 
     107 
     108 
     109        /** 
     110         * Get the numberic value for this control. 
     111         * This method is required by {@link IDataRenderer}. 
     112         * It is the same as {@link getValue()}. 
     113         * @return string number 
     114         * @see getValue 
     115         * @since 3.1.2 
     116         */ 
     117        public function getData() 
     118        { 
     119                return $this->getValue(); 
     120        } 
     121 
     122        /** 
     123         * Set the numberic value for this control. 
     124         * This method is required by {@link IDataRenderer}. 
     125         * It is the same as {@link setValue()}. 
     126         * @param string the number value 
     127         * @see setValue 
     128         * @since 3.1.2 
     129         */ 
     130        public function setData($value) 
     131        { 
     132                $this->setValue($value); 
    106133        } 
    107134