From 1c6f1f79d011579a158e87459040075331b636b7 Mon Sep 17 00:00:00 2001 From: wei <> Date: Mon, 12 Jun 2006 03:10:47 +0000 Subject: Minor updates. --- .../SQLMap/Configuration/TConfigDeserialize.php | 21 +- .../SQLMap/DataMapper/TPropertyAccess.php | 30 +- framework/DataAccess/TActiveRecord.php | 51 + framework/DataAccess/TAdodb.php | 5 +- framework/DataAccess/TEzpdo.php | 251 +++ framework/Exceptions/messages.txt | 621 ++++---- framework/Web/Javascripts/extended/base.js | 97 +- framework/Web/Javascripts/js/prado.js | 6 +- framework/Web/Javascripts/prado/activecontrols3.js | 2 +- framework/Web/UI/TClientScriptManager.php | 15 +- framework/Web/UI/WebControls/TBulletedList.php | 868 +++++------ framework/Web/UI/WebControls/TButton.php | 512 +++--- framework/Web/UI/WebControls/TCheckBox.php | 792 +++++----- framework/Web/UI/WebControls/TDatePicker.php | 7 +- framework/Web/UI/WebControls/TImageButton.php | 754 ++++----- framework/Web/UI/WebControls/TImageMap.php | 1452 ++++++++--------- framework/Web/UI/WebControls/TLinkButton.php | 510 +++--- framework/Web/UI/WebControls/TListControl.php | 1648 ++++++++++---------- framework/Web/UI/WebControls/TRadioButton.php | 362 ++--- 19 files changed, 4227 insertions(+), 3777 deletions(-) create mode 100644 framework/DataAccess/TActiveRecord.php create mode 100644 framework/DataAccess/TEzpdo.php (limited to 'framework') diff --git a/framework/DataAccess/SQLMap/Configuration/TConfigDeserialize.php b/framework/DataAccess/SQLMap/Configuration/TConfigDeserialize.php index 9a44d1ec..ee8f1744 100644 --- a/framework/DataAccess/SQLMap/Configuration/TConfigDeserialize.php +++ b/framework/DataAccess/SQLMap/Configuration/TConfigDeserialize.php @@ -111,6 +111,7 @@ class TConfigDeserialize $property->initialize($sqlMap, $resultMap); $resultMap->addResultProperty($property); } + $discriminator = null; if(isset($node->discriminator)) { @@ -118,18 +119,24 @@ class TConfigDeserialize $this->loadConfiguration($discriminator, $node->discriminator, $file); $discriminator->initMapping($sqlMap, $resultMap); } + + + foreach($node->subMap as $subMapNode) { - if(is_null($discriminator)) - throw new TSqlMapConfigurationException( - 'sqlmap_undefined_discriminator', $resultMap->getID(), $file); - $subMap = new TSubMap; - $this->loadConfiguration($subMap, $subMapNode, $file); - $discriminator->add($subMap); + if(isset($subMapNode['value'])) + { + if(is_null($discriminator)) + throw new TSqlMapConfigurationException( + 'sqlmap_undefined_discriminator', $resultMap->getID(), $file); + + $subMap = new TSubMap; + $this->loadConfiguration($subMap, $subMapNode, $file); + $discriminator->add($subMap); + } } if(!is_null($discriminator)) $resultMap->setDiscriminator($discriminator); - return $resultMap; } diff --git a/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php b/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php index 8680601e..4bbe2cb5 100644 --- a/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php +++ b/framework/DataAccess/SQLMap/DataMapper/TPropertyAccess.php @@ -39,7 +39,7 @@ class TPropertyAccess */ public static function get($object,$path) { - if(!is_array($object) && !is_object($object)) + if(!is_array($object) || !is_object($object)) return $object; $properties = explode('.', $path); foreach($properties as $prop) @@ -67,6 +67,34 @@ class TPropertyAccess return $object; } + public static function has($object, $path) + { + if(!is_array($object) || !is_object($object)) + return false; + $properties = explode('.', $path); + foreach($properties as $prop) + { + if(is_array($object) || $object instanceof ArrayAccess) + { + if(isset($object[$prop])) + $object = $object[$prop]; + else + return false; + } + else if(is_object($object)) + { + $getter = 'get'.$prop; + if(is_callable(array($object,$getter))) + $object = $object->{$getter}(); + else if(in_array($prop, array_keys(get_object_vars($object)))) + $object = $object->{$prop}; + return false; + } + else + return false; + } + return true; + } public static function set($object, $path, $value) { diff --git a/framework/DataAccess/TActiveRecord.php b/framework/DataAccess/TActiveRecord.php new file mode 100644 index 00000000..0c33fde3 --- /dev/null +++ b/framework/DataAccess/TActiveRecord.php @@ -0,0 +1,51 @@ + + * CREATE TABLE persons + * ( + * id INTEGER PRIMARY KEY, + * first_name TEXT NOT NULL, + * last_name TEXT NOT NULL, + * favorite_color TEXT NOT NULL + * ); + * + * Create a class called Person, connect insert some data as follows. + * + * class Person extends TActiveRecord { } + * + * $person = new Person(); + * $person->first_name = 'Andi'; + * $person->last_name = 'Gutmans'; + * $person->favorite_color = 'blue'; + * $person->save(); // this save will perform an INSERT successfully + * + * $person = new Person(); + * $person->first_name = 'John'; + * $person->last_name = 'Lim'; + * $person->favorite_color = 'lavender'; + * $person->save(); // this save will perform an INSERT successfully + * + * // load record where id=2 into a new ADOdb_Active_Record + * $person2 = new Person(); + * $person2->Load('id=2'); + * var_dump($person2); + * + * + * + * + * @author Wei Zhuo + * @version $Revision: $ $Date: $ + * @package System.DataAccess + * @since 3.0 + */ +class TActiveRecord extends ADOdb_Active_Record +{ + +} + +?> \ No newline at end of file diff --git a/framework/DataAccess/TAdodb.php b/framework/DataAccess/TAdodb.php index c7005c76..cd188e49 100644 --- a/framework/DataAccess/TAdodb.php +++ b/framework/DataAccess/TAdodb.php @@ -143,6 +143,7 @@ class TAdodb extends TDatabaseProvider */ public function getConnection() { + $this->init(null); return $this->_connection; } @@ -303,9 +304,10 @@ class TAdodbConnection extends TDbConnection */ public function __construct($provider=null) { - parent::__construct($provider); if(is_string($provider)) $this->initProvider($provider); + else + parent::__construct($provider); } /** @@ -329,7 +331,6 @@ class TAdodbConnection extends TDbConnection //close any open connections before serializing. $this->close(); $this->_connection = null; - return array_keys(get_object_vars($this)); } /** diff --git a/framework/DataAccess/TEzpdo.php b/framework/DataAccess/TEzpdo.php new file mode 100644 index 00000000..de9d53fe --- /dev/null +++ b/framework/DataAccess/TEzpdo.php @@ -0,0 +1,251 @@ + null, + 'recursive' => true, + 'compiled_dir' => null, // default to compiled under current dir + 'compiled_file' => 'compiled_file', // the default class map file + 'backup_compiled' => true, // whether to backup old compiled file + 'check_table_exists' => true, // whether always check if table exists before db operation + 'table_prefix' => '', // table prefix (default to none) + 'relation_table' => '_ez_relation_', // the table name for object relations + 'split_relation_table' => true, // whether to split relation table + 'auto_flush' => false, // enable or disable auto flush at the end of script + 'flush_before_find' => true, // enable or disable auto flush before find() + 'auto_compile' => true, // enable or disable auto compile + 'autoload' => false, // enable or disable class autoloading + 'log_queries' => false, // enable logging queries (for debug only) + 'dispatch_events' => true, // whether to dispatch events (true by default) + 'default_oid_column' => 'eoid', // oid column name is default to 'eoid' now + ); + + /** + * @var array List of source directories. + */ + private $_sources = array(); + + /** + * @var epManager ezpdo manager instance. + */ + private $_manager; + + /** + * Initialize the ezpdo module, sets the default compile directory to use + * the Prado runtime directory. + */ + public function init($config) + { + parent::init($config); + include($this->getEzpdoLibrary().'/ezpdo.php'); + $path = $this->getApplication()->getRuntimePath().'/ezpdo'; + $this->_options['compiled_dir'] = $path; + if($this->getApplication()->getMode() != TApplication::STATE_PERFORMANCE) + { + if(!is_dir($path)) + throw new TConfigurationException('ezpdo_compile_dir_not_found', $path); + $this->_options['auto_compile'] = false; + } + } + + /** + * @return string ezpdo library directory. + */ + protected function getEzpdoLibrary() + { + return Prado::getPathOfNamespace('System.3rdParty.ezpdo'); + } + + /** + * @return array merged database connection options with the other options. + */ + protected function getOptions() + { + if(strlen($dsn = $this->getConnectionString()) > 0) + $options['default_dsn'] = $dsn; + else + $options['default_dsn'] = $this->buildDsn(); + + return array_merge($this->_options, $options); + } + + /** + * Initialize the ezManager once. + */ + protected function initialize() + { + Prado::using('System.3rdParty.ezpdo.src.base.epConfig'); + include($this->getEzpdoLibrary().'/src/runtime/epManager.php'); + + if(is_null($this->_manager)) + { + $this->_manager = new epManager; + foreach($this->_sources as $source) + Prado::using($source.'.*'); + $this->_manager->setConfig(new epConfig($this->getOptions())); + } + } + + /** + * @return epManager the ezpdo manager for this module. + */ + public function getConnection() + { + $this->initialize(); + return $this->_manager; + } + + /** + * @param string The intput directory, using dot path aliases, that contains + * class source files to be compiled. Use commma for multiple directories + */ + public function setSourceDirs($values) + { + $paths = array(); + foreach(explode(',', $values) as $value) + { + $dot = Prado::getPathOfNamespace($value); + $this->_sources[] = $value; + if(($path = realpath($dot)) !== false) + $paths[] = $path; + } + $this->_options['source_dirs'] = implode(',', $paths); + } + + /** + * @return string comma delimited list of source directories. + */ + public function getSourceDirs() + { + return $this->_options['source_dir']; + } + + /** + * @param boolean Whether to compile subdirs recursively, default is true. + */ + public function setRecursive($value) + { + $this->_options['recursive'] = TPropertyValue::ensureBoolean($value); + } + + /** + * @return boolean true will compile subdirectories recursively. + */ + public function getRecursive() + { + return $this->_options['recursive']; + } + + /** + * @param string database table prefix. + */ + public function setTablePrefix($value) + { + $this->_options['table_prefix'] = $value; + } + + /** + * @param string the table name for object relations, default is + * '_ez_relation_' + */ + public function setRelationTableName($value) + { + $this->_options['relation_table'] = $value; + } + + /** + * @return string the table name for object relations. + */ + public function getRelationTableName() + { + return $this->_options['relation_table']; + } + + /** + * @param boolean whether to split relation table, default is true. + */ + public function setSplitRelationTable($value) + { + $this->_options['split_relation_table'] = TPropertyValue::ensureBoolean($value); + } + + /** + * @string boolean true will split relation table. + */ + public function getSplitRelationTable() + { + return $this->_options['split_relation_table']; + } + + /** + * @param boolean enable or disable auto flush at the end of script, default + * is false. + */ + public function setAutoFlush($value) + { + $this->_options['auto_flush'] = TPropertyValue::ensureBoolean($value); + } + + /** + * @return boolean whether to auto flush at the end of script. + */ + public function getAutoFlush() + { + return $this->_options['auto_flush']; + } + + /** + * @param boolean enable or disable auto flush before find(), default is + * true. + */ + public function setFlushBeforeFind($value) + { + $this->_options['flush_before_find'] = TPropertyValue::ensureBoolean($value); + } + + /** + * @return boolean whether to auto flush before find() + */ + public function getFlushBeforeFind() + { + return $this->_options['flush_before_find']; + } + + /** + * @param boolean enable or disable auto compile, default is true. + */ + public function setAutoCompile($value) + { + $this->_options['auto_compile'] = TPropertyValue::ensureBoolean($value); + } + + /** + * @return boolean whether to auto compile class files. + */ + public function getAutoCompile() + { + return $this->_options['auto_compile']; + } + + /** + * @param string default oid column name, default is 'eoid'. + */ + public function setDefaultOidColumn($value) + { + $this->_options['default_oid_column'] = $value; + } + + /** + * @return string default oid column name. + */ + public function getDefaultOidColumn($value) + { + return $this->_options['default_oid_column']; + } +} + +?> \ No newline at end of file diff --git a/framework/Exceptions/messages.txt b/framework/Exceptions/messages.txt index 8c79d6ee..028f7f75 100644 --- a/framework/Exceptions/messages.txt +++ b/framework/Exceptions/messages.txt @@ -1,309 +1,312 @@ -prado_application_singleton_required = Prado.Application must only be set once. -prado_component_unknown = Unknown component type '{0}'. -prado_using_invalid = '{0}' is not a valid namespace to be used. Make sure '.*' is appended if you want to use a namespace referring to a directory. -prado_alias_redefined = Alias '{0}' cannot be redefined. -prado_alias_invalid = Alias '{0}' refers to an invalid path '{1}'. Only existing directories can be aliased. -prado_aliasname_invalid = Alias '{0}' contains invalid character '.'. - -component_property_undefined = Component property '{0}.{1}' is not defined. -component_property_readonly = Component property '{0}.{1}' is read-only. -component_event_undefined = Component event '{0}.{1}' is not defined. -component_eventhandler_invalid = Component event '{0}.{1}' is attached with an invalid event handler. -component_expression_invalid = Component '{0}' is evaluating an invalid expression '{1}' : {2}. -component_statements_invalid = Component '{0}' is evaluating invalid PHP statements '{1}' : {2}. - -propertyvalue_enumvalue_invalid = Value '{0}' is a not valid enumeration value ({1}). - -list_index_invalid = Index '{0}' is out of range. -list_item_inexistent = The item cannot be found in the list. -list_data_not_iterable = Data must be either an array or an object implementing Traversable interface. -list_readonly = {0} is read-only. - -map_addition_disallowed = The new item cannot be added to the map. -map_item_unremovable = The item cannot be removed from the map. -map_data_not_iterable = Data must be either an array or an object implementing Traversable interface. -map_readonly = {0} is read-only. - -application_basepath_invalid = Application base path '{0}' does not exist or is not a directory. -application_runtimepath_invalid = Application runtime path '{0}' does not exist or is not writable by Web server process. -application_service_invalid = Service '{0}' must implement IService interface. -application_service_unknown = Requested service '{0}' is not defined. -application_service_unavailable = Service Unavailable. -application_moduleid_duplicated = Application module ID '{0}' is not unique. -application_runtimepath_failed = Unable to create runtime path '{0}'. Make sure the parent directory exists and is writable by the Web process. - -appconfig_aliaspath_invalid = Application configuration uses an invalid file path "{1}". -appconfig_alias_invalid = Application configuration element must have an "id" attribute and a "path" attribute. -appconfig_alias_redefined = Application configuration cannot be redefined. -appconfig_using_invalid = Application configuration element must have a "namespace" attribute. -appconfig_moduleid_required = Application configuration element must have an "id" attribute. -appconfig_moduletype_required = Application configuration must have a "class" attribute. -appconfig_serviceid_required = Application configuration element must have an "id" attribute. -appconfig_servicetype_required = Application configuration must have a "class" attribute. -appconfig_parameterid_required = Application configuration element must have an "id" attribute. - -securitymanager_validationkey_invalid = TSecurityManager.ValidationKey must not be empty. -securitymanager_encryptionkey_invalid = TSecurityManager.EncryptionKey must not be empty. -securitymanager_mcryptextension_required = Mcrypt PHP extension is required in order to use TSecurityManager's encryption feature. - -uri_format_invalid = '{0}' is not a valid URI. - -httpresponse_bufferoutput_unchangeable = THttpResponse.BufferOutput cannot be modified after THttpResponse is initialized. -httpresponse_file_inexistent = THttpResponse cannot send file '{0}'. The file does not exist. - -httpsession_sessionid_unchangeable = THttpSession.SessionID cannot be modified after the session is started. -httpsession_sessionname_unchangeable = THttpSession.SessionName cannot be modified after the session is started. -httpsession_sessionname_invalid = THttpSession.SessionName must contain alphanumeric characters only. -httpsession_savepath_unchangeable = THttpSession.SavePath cannot be modified after the session is started. -httpsession_savepath_invalid = THttpSession.SavePath '{0}' is invalid. -httpsession_storage_unchangeable = THttpSession.Storage cannot be modified after the session is started. -httpsession_cookiemode_unchangeable = THttpSession.CookieMode cannot be modified after the session is started. -httpsession_autostart_unchangeable = THttpSession.AutoStart cannot be modified after the session module is initialized. -httpsession_gcprobability_unchangeable = THttpSession.GCProbability cannot be modified after the session is started. -httpsession_gcprobability_invalid = THttpSession.GCProbability must be an integer between 0 and 100. -httpsession_transid_unchangeable = THttpSession.UseTransparentSessionID cannot be modified after the session is started. -httpsession_maxlifetime_unchangeable = THttpSession.Timeout cannot be modified after the session is started. - -assetmanager_basepath_invalid = TAssetManager.BasePath '{0}' is invalid. Make sure it is in namespace form and points to a directory writable by the Web server process. -assetmanager_basepath_unchangeable = TAssetManager.BasePath cannot be modified after the module is initialized. -assetmanager_baseurl_unchangeable = TAssetManager.BaseUrl cannot be modified after the module is initialized. -assetmanager_filepath_invalid = TAssetManager is publishing an invalid file '{0}'. -assetmanager_tarchecksum_invalid = TAssetManager is publishing a tar file with invalid checksum '{0}'. -assetmanager_tarfile_invalid = TAssetManager is publishing an invalid tar file '{0}'. - -sqlitecache_extension_required = TSqliteCache requires SQLite PHP extension. -sqlitecache_dbfile_required = TSqliteCache.DbFile is required. -sqlitecache_connection_failed = TSqliteCache database connection failed. {0}. -sqlitecache_table_creation_failed = TSqliteCache failed to create cache database. {0}. -sqlitecache_dbfile_unchangeable = TSqliteCache.DbFile cannot be modified after the module is initialized. -sqlitecache_dbfile_invalid = TSqliteCache.DbFile is invalid. Make sure it is in a proper namespace format. - -memcache_extension_required = TMemCache requires memcache PHP extension. -memcache_connection_failed = TMemCache failed to connect to memcache server {0}:{1}. -memcache_host_unchangeable = TMemCache.Host cannot be modified after the module is initialized. -memcache_port_unchangeable = TMemCache.Port cannot be modified after the module is initialized. - -apccache_extension_required = TAPCCache requires APC PHP extension. -apccache_add_unsupported = TAPCCache.add() is not supported. -apccache_replace_unsupported = TAPCCache.replace() is not supported. - -errorhandler_errortemplatepath_invalid = TErrorHandler.ErrorTemplatePath '{0}' is invalid. Make sure it is in namespace form and points to a valid directory containing error template files. - -pageservice_page_unknown = Page '{0}' Not Found -pageservice_pageclass_unknown = Page class '{0}' is unknown. -pageservice_basepath_invalid = TPageService.BasePath '{0}' is not a valid directory. -pageservice_page_required = Page Name Required -pageservice_defaultpage_unchangeable = TPageService.DefaultPage cannot be modified after the service is initialized. -pageservice_basepath_unchangeable = TPageService.BasePath cannot be modified after the service is initialized. - -pageserviceconf_file_invalid = Unable to open page directory configuration file '{0}'. -pageserviceconf_aliaspath_invalid = uses an invalid file path "{1}" in page directory configuration file '{2}'. -pageserviceconf_alias_invalid = element must have an "id" attribute and a "path" attribute in page directory configuration file '{0}'. -pageserviceconf_using_invalid = element must have a "namespace" attribute in page directory configuration file '{0}'. -pageserviceconf_module_invalid = element must have an "id" attribute in page directory configuration file '{0}'. -pageserviceconf_moduletype_required = must have a "class" attribute in page directory configuration file '{1}'. -pageserviceconf_parameter_invalid = element must have an "id" attribute in page directory configuration file '{0}'. -pageserviceconf_page_invalid = element must have an "id" attribute in page directory configuration file '{0}'. - -template_closingtag_unexpected = Unexpected closing tag '{0}' is found. -template_closingtag_expected = Closing tag '{0}' is expected. -template_directive_nonunique = Directive '<%@ ... %>' must appear at the beginning of the template and can appear at most once. -template_comments_forbidden = Template comments are not allowed within property tags. -template_matching_unexpected = Unexpected matching. -template_property_unknown = {0} has no property called '{1}'. -template_event_unknown = {0} has no event called '{1}'. -template_property_readonly = {0} has a read-only property '{1}'. -template_event_forbidden = {0} is a non-control component. No handler can be attached to its event '{1}' in a template. -template_databind_forbidden = {0} is a non-control component. Expressions cannot be bound to its property '{1}'. -template_component_required = '{0}' is not a component. Only components can appear in a template. -template_format_invalid = Error in {0} (line {1}) : {2} -template_format_invalid2 = Error at line {0} of the following template: {1} {2} -template_property_duplicated = Property {0} is configured twice or more. -template_eventhandler_invalid = {0}.{1} can only accept a static string. -template_controlid_invalid = {0}.ID can only accept a static text string. -template_controlskinid_invalid = {0}.SkinID can only accept a static text string. -template_content_unexpected = Unexpected content is encountered when instantiating template: {0}. - -xmldocument_file_read_failed = TXmlDocument is unable to read file '{0}'. -xmldocument_file_write_failed = TXmlDocument is unable to write file '{0}'. - -xmlelementlist_xmlelement_required = TXmlElementList can only accept TXmlElement objects. - -authorizationrule_action_invalid = TAuthorizationRule.Action can only take 'allow' or 'deny' as the value. -authorizationrule_verb_invalid = TAuthorizationRule.Verb can only take 'get' or 'post' as the value. - -authorizationrulecollection_authorizationrule_required = TAuthorizationRuleCollection can only accept TAuthorizationRule objects. - -usermanager_userfile_invalid = TUserManager.UserFile '{0}' is not a valid file. -usermanager_userfile_unchangeable = TUserManager.UserFile cannot be modified. The user module has been initialized already. - -authmanager_usermanager_required = TAuthManager.UserManager must be assigned a value. -authmanager_usermanager_inexistent = TAuthManager.UserManager '{0}' does not refer to an ID of application module. -authmanager_usermanager_invalid = TAuthManager.UserManager '{0}' does not refer to a valid TUserManager application module. -authmanager_usermanager_unchangeable = TAuthManager.UserManager cannot be modified after the module is initialized. -authmanager_session_required = TAuthManager requires a session application module. - -thememanager_basepath_invalid = TThemeManager.BasePath '{0}' is not a valid directory. -thememanager_basepath_unchangeable = TThemeManager.BasePath cannot be modified after the module is initialized. - -theme_baseurl_required = TThemeManager.BasePath is required. By default, a directory named 'themes' under the directory containing the application entry script is assumed. -theme_path_inexistent = Theme path '{0}' does not exist. -theme_control_nested = Skin for control type '{0}' in theme '{1}' cannot be within another skin. -theme_skinid_duplicated = SkinID '{0}.{1}' is duplicated in theme '{2}'. -theme_databind_forbidden = Databind cannot be used in theme '{0}' for control skin '{1}.{2}' about property '{3}'. -theme_property_readonly = Skin is being applied to a read-only control property '{0}.{1}'. -theme_property_undefined = Skin is being applied to an inexistent control property '{0}.{1}'. - -control_object_reregistered = Duplicated object ID '{0}' found. -control_id_invalid = {0}.ID '{1}' is invalid. Only alphanumeric and underline characters are allowed. The first character must be an alphabetic or underline character. -control_skinid_unchangeable = {0}.SkinID cannot be modified after a skin has been applied to the control or the child controls have been created. -control_enabletheming_unchangeable = {0}.EnableTheming cannot be modified after the child controls have been created. -control_stylesheet_applied = StyleSheet skin has already been applied to {0}. -control_id_nonunique = {0}.ID '{1}' is not unique among all controls under the same naming container. - -templatecontrol_mastercontrol_invalid = Master control must be of type TTemplateControl or a child class. -templatecontrol_contentid_duplicated = TContent ID '{0}' is duplicated. -templatecontrol_placeholderid_duplicated= TContentPlaceHolder ID '{0}' is duplicated. -templatecontrol_directive_invalid = {0}.{1} can only accept a static text string through a template directive. -templatecontrol_placeholder_inexistent = TContent '{0}' does not have a matching TContentPlaceHolder. - -page_form_duplicated = A page can contain at most one TForm. Use regular HTML form tags for the rest forms. -page_isvalid_unknown = TPage.IsValid has not been evaluated yet. -page_postbackcontrol_invalid = Unable to determine postback control '{0}'. -page_control_outofform = {0} '{1}' must be enclosed within TForm. -page_head_duplicated = A page can contain at most one THead. -page_statepersister_invalid = Page state persister must implement IPageStatePersister interface. - -csmanager_pradoscript_invalid = Unknown Prado script library name '{0}'. - -contentplaceholder_id_required = TContentPlaceHolder must have an ID. - -content_id_required = TContent must have an ID. - -controlcollection_control_required = TControlList can only accept strings or TControl objects. - -webcontrol_accesskey_invalid = {0}.AccessKey '{1}' is invalid. It must be a single character only. -webcontrol_style_invalid = {0}.Style must take string value only. - -listcontrol_selection_invalid = {0} has an invalid selection that is set before performing databinding. -listcontrol_selectedindex_invalid = {0}.SelectedIndex has an invalid value {1}. -listcontrol_selectedvalue_invalid = {0}.SelectedValue has an invalid value '{1}'. -listcontrol_expression_invalid = {0} is evaluating an invalid expression '{1}' : {2} - -label_associatedcontrol_invalid = TLabel.AssociatedControl '{0}' cannot be found. - -hiddenfield_focus_unsupported = THiddenField does not support setting input focus. -hiddenfield_theming_unsupported = THiddenField does not support theming. -hiddenfield_skinid_unsupported = THiddenField does not support control skin. - -panel_defaultbutton_invalid = TPanel.DefaultButton '{0}' does not refer to an existing button control. - -tablestyle_cellpadding_invalid = TTableStyle.CellPadding must take an integer equal to or greater than -1. -tablestyle_cellspacing_invalid = TTableStyle.CellSpacing must take an integer equal to or greater than -1. - -pagestatepersister_pagestate_corrupted = Page state is corrupted. - -sessionpagestatepersister_pagestate_corrupted = Page state is corrupted. -sessionpagestatepersister_historysize_invalid = TSessionPageStatePersister.History must be an integer greater than 0. - -listitemcollection_item_invalid = TListItemCollection can only take strings or TListItem objects. - -dropdownlist_selectedindices_unsupported= TDropDownList.SelectedIndices is read-only. - -bulletedlist_autopostback_unsupported = TBulletedList.AutoPostBack is read-only. -bulletedlist_selectedindex_unsupported = TBulletedList.SelectedIndex is read-only. -bulletedlist_selectedindices_unsupported= TBulletedList.SelectedIndices is read-only. -bulletedlist_selectedvalue_unsupported = TBulletedList.SelectedValue is read-only. - -radiobuttonlist_selectedindices_unsupported = TRadioButtonList.SelectedIndices is read-only. - -logrouter_configfile_invalid = TLogRouter.ConfigFile '{0}' does not exist. -logrouter_routeclass_required = Class attribute is required in configuration. -logrouter_routetype_required = Log route must be an instance of TLogRoute or its derived class. - -filelogroute_logpath_invalid = TFileLogRoute.LogPath '{0}' must be a directory in namespace format and must be writable by the Web server process. -filelogroute_maxfilesize_invalid = TFileLogRoute.MaxFileSize must be greater than 0. -filelogroute_maxlogfiles_invalid = TFileLogRoute.MaxLogFiles must be greater than 0. - -emaillogroute_sentfrom_required = TEmailLogRoute.SentFrom cannot be empty. - -repeatinfo_repeatcolumns_invalid = TRepeatInfo.RepeatColumns must be no less than 0. - -basevalidator_controltovalidate_invalid = {0}.ControlToValidate is empty or contains an invalid control ID path. -basevalidator_validatable_required = {0}.ControlToValidate must point to a control implementing IValidatable interface. -basevalidator_forcontrol_unsupported = {0}.ForControl is not supported. - -comparevalidator_controltocompare_invalid = TCompareValidator.ControlToCompare contains an invalid control ID path. - -listcontrolvalidator_invalid_control = {0}.ControlToValidate contains an invalid TListControl ID path, "{1}" is a {2}. - -repeater_template_required = TRepeater.{0} requires a template instance implementing ITemplate interface. -datalist_template_required = TDataList.{0} requires a template instance implementing ITemplate interface. -templatecolumn_template_required = TTemplateColumn.{0} requires a template instance implementing ITemplate interface. - -datagrid_currentpageindex_invalid = TDataGrid.CurrentPageIndex must be no less than 0. -datagrid_pagesize_invalid = TDataGrid.PageSize must be greater than 0. -datagrid_virtualitemcount_invalid = TDataGrid.VirtualItemCount must be no less than 0. - -datagridpagerstyle_pagebuttoncount_invalid = TDataGridPagerStyle.PageButtonCount must be greater than 0. - -datafieldaccessor_data_invalid = TDataFieldAccessor is trying to evaluate a field value of an invalid data. Make sure the data is an array, TMap, TList, or object that contains the specified field '{0}'. -datafieldaccessor_datafield_invalid = TDataFieldAccessor is trying to evaluate data value of an unknown field '{0}'. - -repeateritemcollection_repeateritem_required = TRepeaterItemCollection can only accept TRepeaterItem objects. - -datagriditemcollection_datagriditem_required = TDataGridItemCollection can only accept TDataGridItem objects. - -datagridcolumncollection_datagridcolumn_required = TDataGridColumnCollection can only accept TDataGridColumn objects. - -datalistitemcollection_datalistitem_required = TDataListItemCollection can only accept TDataListItem objects. - -tablerowcollection_tablerow_required = TTableRowCollection can only accept TTableRow objects. - -tablecellcollection_tablerow_required = TTableCellCollection can only accept TTableCell objects. - -multiview_view_required = TMultiView can only accept TView as child. -multiview_activeviewindex_invalid = TMultiView.ActiveViewIndex has an invalid index '{0}'. -multiview_view_inexistent = TMultiView cannot find the specified view. -multiview_viewid_invalid = TMultiView cannot find the view '{0}' to switch to. - -viewcollection_view_required = TViewCollection can only accept TView as its element. - -view_visible_readonly = TView.Visible is read-only. Use TView.Active to toggle its visibility. - -wizard_step_invalid = The step to be activated cannot be found in wizard step collection. -wizard_command_invalid = Invalid wizard navigation command '{0}'. - -table_tablesection_outoforder = TTable table sections must be in the order of: Header, Body and Footer. - -completewizardstep_steptype_readonly = TCompleteWizardStep.StepType is read-only. - -wizardstepcollection_wizardstep_required = TWizardStepCollection can only accept objects of TWizardStep or its derived classes. - -texthighlighter_stylesheet_invalid = Unable to find the stylesheet file for TTextHighlighter. - -hotspotcollection_hotspot_required = THotSpotCollection can only accept instance of THotSpot or its derived classes. - -htmlarea_textmode_readonly = THtmlArea.TextMode is read-only. -htmlarea_tarfile_invalid = THtmlArea is unable to locate the TinyMCE tar file. - -parametermodule_parameterfile_unchangeable = TParameterModule.ParameterFile is not changeable because the module is already initialized. -parametermodule_parameterfile_invalid = TParameterModule.ParameterFile '{0}' is invalid. Make sure it is in namespace format and the file extension is '.xml'. -parametermodule_parameterid_required = Parameter element must have 'id' attribute. - -datagridcolumn_expression_invalid = {0} is evaluating an invalid expression '{1}' : {2} - -outputcache_duration_invalid = {0}.Duration must be an integer no less than 0. - -stack_data_not_iterable = TStack can only fetch data from an array or a traversable object. -stack_empty = TStack is empty. - -queue_data_not_iterable = TQueue can only fetch data from an array or a traversable object. -queue_empty = TQueue is empty. - -callback_not_support_no_priority_state_update = Callback request does not support unprioritized pagestate update. - -xmltransform_xslextension_required = TXmlTransform require the PHP's XSL extension -xmltransform_transformpath_invalid = TransformPath '{0}' is invalid. -xmltransform_documentpath_invalid = DocumentPath '{0}' is invalid. -xmltransform_transform_required = Either TransformContent or TransformPath property must be set. +prado_application_singleton_required = Prado.Application must only be set once. +prado_component_unknown = Unknown component type '{0}'. +prado_using_invalid = '{0}' is not a valid namespace to be used. Make sure '.*' is appended if you want to use a namespace referring to a directory. +prado_alias_redefined = Alias '{0}' cannot be redefined. +prado_alias_invalid = Alias '{0}' refers to an invalid path '{1}'. Only existing directories can be aliased. +prado_aliasname_invalid = Alias '{0}' contains invalid character '.'. + +component_property_undefined = Component property '{0}.{1}' is not defined. +component_property_readonly = Component property '{0}.{1}' is read-only. +component_event_undefined = Component event '{0}.{1}' is not defined. +component_eventhandler_invalid = Component event '{0}.{1}' is attached with an invalid event handler. +component_expression_invalid = Component '{0}' is evaluating an invalid expression '{1}' : {2}. +component_statements_invalid = Component '{0}' is evaluating invalid PHP statements '{1}' : {2}. + +propertyvalue_enumvalue_invalid = Value '{0}' is a not valid enumeration value ({1}). + +list_index_invalid = Index '{0}' is out of range. +list_item_inexistent = The item cannot be found in the list. +list_data_not_iterable = Data must be either an array or an object implementing Traversable interface. +list_readonly = {0} is read-only. + +map_addition_disallowed = The new item cannot be added to the map. +map_item_unremovable = The item cannot be removed from the map. +map_data_not_iterable = Data must be either an array or an object implementing Traversable interface. +map_readonly = {0} is read-only. + +application_basepath_invalid = Application base path '{0}' does not exist or is not a directory. +application_runtimepath_invalid = Application runtime path '{0}' does not exist or is not writable by Web server process. +application_service_invalid = Service '{0}' must implement IService interface. +application_service_unknown = Requested service '{0}' is not defined. +application_service_unavailable = Service Unavailable. +application_moduleid_duplicated = Application module ID '{0}' is not unique. +application_runtimepath_failed = Unable to create runtime path '{0}'. Make sure the parent directory exists and is writable by the Web process. + +appconfig_aliaspath_invalid = Application configuration uses an invalid file path "{1}". +appconfig_alias_invalid = Application configuration element must have an "id" attribute and a "path" attribute. +appconfig_alias_redefined = Application configuration cannot be redefined. +appconfig_using_invalid = Application configuration element must have a "namespace" attribute. +appconfig_moduleid_required = Application configuration element must have an "id" attribute. +appconfig_moduletype_required = Application configuration must have a "class" attribute. +appconfig_serviceid_required = Application configuration element must have an "id" attribute. +appconfig_servicetype_required = Application configuration must have a "class" attribute. +appconfig_parameterid_required = Application configuration element must have an "id" attribute. + +securitymanager_validationkey_invalid = TSecurityManager.ValidationKey must not be empty. +securitymanager_encryptionkey_invalid = TSecurityManager.EncryptionKey must not be empty. +securitymanager_mcryptextension_required = Mcrypt PHP extension is required in order to use TSecurityManager's encryption feature. + +uri_format_invalid = '{0}' is not a valid URI. + +httpresponse_bufferoutput_unchangeable = THttpResponse.BufferOutput cannot be modified after THttpResponse is initialized. +httpresponse_file_inexistent = THttpResponse cannot send file '{0}'. The file does not exist. + +httpsession_sessionid_unchangeable = THttpSession.SessionID cannot be modified after the session is started. +httpsession_sessionname_unchangeable = THttpSession.SessionName cannot be modified after the session is started. +httpsession_sessionname_invalid = THttpSession.SessionName must contain alphanumeric characters only. +httpsession_savepath_unchangeable = THttpSession.SavePath cannot be modified after the session is started. +httpsession_savepath_invalid = THttpSession.SavePath '{0}' is invalid. +httpsession_storage_unchangeable = THttpSession.Storage cannot be modified after the session is started. +httpsession_cookiemode_unchangeable = THttpSession.CookieMode cannot be modified after the session is started. +httpsession_autostart_unchangeable = THttpSession.AutoStart cannot be modified after the session module is initialized. +httpsession_gcprobability_unchangeable = THttpSession.GCProbability cannot be modified after the session is started. +httpsession_gcprobability_invalid = THttpSession.GCProbability must be an integer between 0 and 100. +httpsession_transid_unchangeable = THttpSession.UseTransparentSessionID cannot be modified after the session is started. +httpsession_maxlifetime_unchangeable = THttpSession.Timeout cannot be modified after the session is started. + +assetmanager_basepath_invalid = TAssetManager.BasePath '{0}' is invalid. Make sure it is in namespace form and points to a directory writable by the Web server process. +assetmanager_basepath_unchangeable = TAssetManager.BasePath cannot be modified after the module is initialized. +assetmanager_baseurl_unchangeable = TAssetManager.BaseUrl cannot be modified after the module is initialized. +assetmanager_filepath_invalid = TAssetManager is publishing an invalid file '{0}'. +assetmanager_tarchecksum_invalid = TAssetManager is publishing a tar file with invalid checksum '{0}'. +assetmanager_tarfile_invalid = TAssetManager is publishing an invalid tar file '{0}'. + +sqlitecache_extension_required = TSqliteCache requires SQLite PHP extension. +sqlitecache_dbfile_required = TSqliteCache.DbFile is required. +sqlitecache_connection_failed = TSqliteCache database connection failed. {0}. +sqlitecache_table_creation_failed = TSqliteCache failed to create cache database. {0}. +sqlitecache_dbfile_unchangeable = TSqliteCache.DbFile cannot be modified after the module is initialized. +sqlitecache_dbfile_invalid = TSqliteCache.DbFile is invalid. Make sure it is in a proper namespace format. + +memcache_extension_required = TMemCache requires memcache PHP extension. +memcache_connection_failed = TMemCache failed to connect to memcache server {0}:{1}. +memcache_host_unchangeable = TMemCache.Host cannot be modified after the module is initialized. +memcache_port_unchangeable = TMemCache.Port cannot be modified after the module is initialized. + +apccache_extension_required = TAPCCache requires APC PHP extension. +apccache_add_unsupported = TAPCCache.add() is not supported. +apccache_replace_unsupported = TAPCCache.replace() is not supported. + +errorhandler_errortemplatepath_invalid = TErrorHandler.ErrorTemplatePath '{0}' is invalid. Make sure it is in namespace form and points to a valid directory containing error template files. + +pageservice_page_unknown = Page '{0}' Not Found +pageservice_pageclass_unknown = Page class '{0}' is unknown. +pageservice_basepath_invalid = TPageService.BasePath '{0}' is not a valid directory. +pageservice_page_required = Page Name Required +pageservice_defaultpage_unchangeable = TPageService.DefaultPage cannot be modified after the service is initialized. +pageservice_basepath_unchangeable = TPageService.BasePath cannot be modified after the service is initialized. + +pageserviceconf_file_invalid = Unable to open page directory configuration file '{0}'. +pageserviceconf_aliaspath_invalid = uses an invalid file path "{1}" in page directory configuration file '{2}'. +pageserviceconf_alias_invalid = element must have an "id" attribute and a "path" attribute in page directory configuration file '{0}'. +pageserviceconf_using_invalid = element must have a "namespace" attribute in page directory configuration file '{0}'. +pageserviceconf_module_invalid = element must have an "id" attribute in page directory configuration file '{0}'. +pageserviceconf_moduletype_required = must have a "class" attribute in page directory configuration file '{1}'. +pageserviceconf_parameter_invalid = element must have an "id" attribute in page directory configuration file '{0}'. +pageserviceconf_page_invalid = element must have an "id" attribute in page directory configuration file '{0}'. + +template_closingtag_unexpected = Unexpected closing tag '{0}' is found. +template_closingtag_expected = Closing tag '{0}' is expected. +template_directive_nonunique = Directive '<%@ ... %>' must appear at the beginning of the template and can appear at most once. +template_comments_forbidden = Template comments are not allowed within property tags. +template_matching_unexpected = Unexpected matching. +template_property_unknown = {0} has no property called '{1}'. +template_event_unknown = {0} has no event called '{1}'. +template_property_readonly = {0} has a read-only property '{1}'. +template_event_forbidden = {0} is a non-control component. No handler can be attached to its event '{1}' in a template. +template_databind_forbidden = {0} is a non-control component. Expressions cannot be bound to its property '{1}'. +template_component_required = '{0}' is not a component. Only components can appear in a template. +template_format_invalid = Error in {0} (line {1}) : {2} +template_format_invalid2 = Error at line {0} of the following template: {1} {2} +template_property_duplicated = Property {0} is configured twice or more. +template_eventhandler_invalid = {0}.{1} can only accept a static string. +template_controlid_invalid = {0}.ID can only accept a static text string. +template_controlskinid_invalid = {0}.SkinID can only accept a static text string. +template_content_unexpected = Unexpected content is encountered when instantiating template: {0}. + +xmldocument_file_read_failed = TXmlDocument is unable to read file '{0}'. +xmldocument_file_write_failed = TXmlDocument is unable to write file '{0}'. + +xmlelementlist_xmlelement_required = TXmlElementList can only accept TXmlElement objects. + +authorizationrule_action_invalid = TAuthorizationRule.Action can only take 'allow' or 'deny' as the value. +authorizationrule_verb_invalid = TAuthorizationRule.Verb can only take 'get' or 'post' as the value. + +authorizationrulecollection_authorizationrule_required = TAuthorizationRuleCollection can only accept TAuthorizationRule objects. + +usermanager_userfile_invalid = TUserManager.UserFile '{0}' is not a valid file. +usermanager_userfile_unchangeable = TUserManager.UserFile cannot be modified. The user module has been initialized already. + +authmanager_usermanager_required = TAuthManager.UserManager must be assigned a value. +authmanager_usermanager_inexistent = TAuthManager.UserManager '{0}' does not refer to an ID of application module. +authmanager_usermanager_invalid = TAuthManager.UserManager '{0}' does not refer to a valid TUserManager application module. +authmanager_usermanager_unchangeable = TAuthManager.UserManager cannot be modified after the module is initialized. +authmanager_session_required = TAuthManager requires a session application module. + +thememanager_basepath_invalid = TThemeManager.BasePath '{0}' is not a valid directory. +thememanager_basepath_unchangeable = TThemeManager.BasePath cannot be modified after the module is initialized. + +theme_baseurl_required = TThemeManager.BasePath is required. By default, a directory named 'themes' under the directory containing the application entry script is assumed. +theme_path_inexistent = Theme path '{0}' does not exist. +theme_control_nested = Skin for control type '{0}' in theme '{1}' cannot be within another skin. +theme_skinid_duplicated = SkinID '{0}.{1}' is duplicated in theme '{2}'. +theme_databind_forbidden = Databind cannot be used in theme '{0}' for control skin '{1}.{2}' about property '{3}'. +theme_property_readonly = Skin is being applied to a read-only control property '{0}.{1}'. +theme_property_undefined = Skin is being applied to an inexistent control property '{0}.{1}'. + +control_object_reregistered = Duplicated object ID '{0}' found. +control_id_invalid = {0}.ID '{1}' is invalid. Only alphanumeric and underline characters are allowed. The first character must be an alphabetic or underline character. +control_skinid_unchangeable = {0}.SkinID cannot be modified after a skin has been applied to the control or the child controls have been created. +control_enabletheming_unchangeable = {0}.EnableTheming cannot be modified after the child controls have been created. +control_stylesheet_applied = StyleSheet skin has already been applied to {0}. +control_id_nonunique = {0}.ID '{1}' is not unique among all controls under the same naming container. + +templatecontrol_mastercontrol_invalid = Master control must be of type TTemplateControl or a child class. +templatecontrol_contentid_duplicated = TContent ID '{0}' is duplicated. +templatecontrol_placeholderid_duplicated= TContentPlaceHolder ID '{0}' is duplicated. +templatecontrol_directive_invalid = {0}.{1} can only accept a static text string through a template directive. +templatecontrol_placeholder_inexistent = TContent '{0}' does not have a matching TContentPlaceHolder. + +page_form_duplicated = A page can contain at most one TForm. Use regular HTML form tags for the rest forms. +page_isvalid_unknown = TPage.IsValid has not been evaluated yet. +page_postbackcontrol_invalid = Unable to determine postback control '{0}'. +page_control_outofform = {0} '{1}' must be enclosed within TForm. +page_head_duplicated = A page can contain at most one THead. +page_statepersister_invalid = Page state persister must implement IPageStatePersister interface. + +csmanager_pradoscript_invalid = Unknown Prado script library name '{0}'. + +contentplaceholder_id_required = TContentPlaceHolder must have an ID. + +content_id_required = TContent must have an ID. + +controlcollection_control_required = TControlList can only accept strings or TControl objects. + +webcontrol_accesskey_invalid = {0}.AccessKey '{1}' is invalid. It must be a single character only. +webcontrol_style_invalid = {0}.Style must take string value only. + +listcontrol_selection_invalid = {0} has an invalid selection that is set before performing databinding. +listcontrol_selectedindex_invalid = {0}.SelectedIndex has an invalid value {1}. +listcontrol_selectedvalue_invalid = {0}.SelectedValue has an invalid value '{1}'. +listcontrol_expression_invalid = {0} is evaluating an invalid expression '{1}' : {2} + +label_associatedcontrol_invalid = TLabel.AssociatedControl '{0}' cannot be found. + +hiddenfield_focus_unsupported = THiddenField does not support setting input focus. +hiddenfield_theming_unsupported = THiddenField does not support theming. +hiddenfield_skinid_unsupported = THiddenField does not support control skin. + +panel_defaultbutton_invalid = TPanel.DefaultButton '{0}' does not refer to an existing button control. + +tablestyle_cellpadding_invalid = TTableStyle.CellPadding must take an integer equal to or greater than -1. +tablestyle_cellspacing_invalid = TTableStyle.CellSpacing must take an integer equal to or greater than -1. + +pagestatepersister_pagestate_corrupted = Page state is corrupted. + +sessionpagestatepersister_pagestate_corrupted = Page state is corrupted. +sessionpagestatepersister_historysize_invalid = TSessionPageStatePersister.History must be an integer greater than 0. + +listitemcollection_item_invalid = TListItemCollection can only take strings or TListItem objects. + +dropdownlist_selectedindices_unsupported= TDropDownList.SelectedIndices is read-only. + +bulletedlist_autopostback_unsupported = TBulletedList.AutoPostBack is read-only. +bulletedlist_selectedindex_unsupported = TBulletedList.SelectedIndex is read-only. +bulletedlist_selectedindices_unsupported= TBulletedList.SelectedIndices is read-only. +bulletedlist_selectedvalue_unsupported = TBulletedList.SelectedValue is read-only. + +radiobuttonlist_selectedindices_unsupported = TRadioButtonList.SelectedIndices is read-only. + +logrouter_configfile_invalid = TLogRouter.ConfigFile '{0}' does not exist. +logrouter_routeclass_required = Class attribute is required in configuration. +logrouter_routetype_required = Log route must be an instance of TLogRoute or its derived class. + +filelogroute_logpath_invalid = TFileLogRoute.LogPath '{0}' must be a directory in namespace format and must be writable by the Web server process. +filelogroute_maxfilesize_invalid = TFileLogRoute.MaxFileSize must be greater than 0. +filelogroute_maxlogfiles_invalid = TFileLogRoute.MaxLogFiles must be greater than 0. + +emaillogroute_sentfrom_required = TEmailLogRoute.SentFrom cannot be empty. + +repeatinfo_repeatcolumns_invalid = TRepeatInfo.RepeatColumns must be no less than 0. + +basevalidator_controltovalidate_invalid = {0}.ControlToValidate is empty or contains an invalid control ID path. +basevalidator_validatable_required = {0}.ControlToValidate must point to a control implementing IValidatable interface. +basevalidator_forcontrol_unsupported = {0}.ForControl is not supported. + +comparevalidator_controltocompare_invalid = TCompareValidator.ControlToCompare contains an invalid control ID path. + +listcontrolvalidator_invalid_control = {0}.ControlToValidate contains an invalid TListControl ID path, "{1}" is a {2}. + +repeater_template_required = TRepeater.{0} requires a template instance implementing ITemplate interface. +datalist_template_required = TDataList.{0} requires a template instance implementing ITemplate interface. +templatecolumn_template_required = TTemplateColumn.{0} requires a template instance implementing ITemplate interface. + +datagrid_currentpageindex_invalid = TDataGrid.CurrentPageIndex must be no less than 0. +datagrid_pagesize_invalid = TDataGrid.PageSize must be greater than 0. +datagrid_virtualitemcount_invalid = TDataGrid.VirtualItemCount must be no less than 0. + +datagridpagerstyle_pagebuttoncount_invalid = TDataGridPagerStyle.PageButtonCount must be greater than 0. + +datafieldaccessor_data_invalid = TDataFieldAccessor is trying to evaluate a field value of an invalid data. Make sure the data is an array, TMap, TList, or object that contains the specified field '{0}'. +datafieldaccessor_datafield_invalid = TDataFieldAccessor is trying to evaluate data value of an unknown field '{0}'. + +repeateritemcollection_repeateritem_required = TRepeaterItemCollection can only accept TRepeaterItem objects. + +datagriditemcollection_datagriditem_required = TDataGridItemCollection can only accept TDataGridItem objects. + +datagridcolumncollection_datagridcolumn_required = TDataGridColumnCollection can only accept TDataGridColumn objects. + +datalistitemcollection_datalistitem_required = TDataListItemCollection can only accept TDataListItem objects. + +tablerowcollection_tablerow_required = TTableRowCollection can only accept TTableRow objects. + +tablecellcollection_tablerow_required = TTableCellCollection can only accept TTableCell objects. + +multiview_view_required = TMultiView can only accept TView as child. +multiview_activeviewindex_invalid = TMultiView.ActiveViewIndex has an invalid index '{0}'. +multiview_view_inexistent = TMultiView cannot find the specified view. +multiview_viewid_invalid = TMultiView cannot find the view '{0}' to switch to. + +viewcollection_view_required = TViewCollection can only accept TView as its element. + +view_visible_readonly = TView.Visible is read-only. Use TView.Active to toggle its visibility. + +wizard_step_invalid = The step to be activated cannot be found in wizard step collection. +wizard_command_invalid = Invalid wizard navigation command '{0}'. + +table_tablesection_outoforder = TTable table sections must be in the order of: Header, Body and Footer. + +completewizardstep_steptype_readonly = TCompleteWizardStep.StepType is read-only. + +wizardstepcollection_wizardstep_required = TWizardStepCollection can only accept objects of TWizardStep or its derived classes. + +texthighlighter_stylesheet_invalid = Unable to find the stylesheet file for TTextHighlighter. + +hotspotcollection_hotspot_required = THotSpotCollection can only accept instance of THotSpot or its derived classes. + +htmlarea_textmode_readonly = THtmlArea.TextMode is read-only. +htmlarea_tarfile_invalid = THtmlArea is unable to locate the TinyMCE tar file. + +parametermodule_parameterfile_unchangeable = TParameterModule.ParameterFile is not changeable because the module is already initialized. +parametermodule_parameterfile_invalid = TParameterModule.ParameterFile '{0}' is invalid. Make sure it is in namespace format and the file extension is '.xml'. +parametermodule_parameterid_required = Parameter element must have 'id' attribute. + +datagridcolumn_expression_invalid = {0} is evaluating an invalid expression '{1}' : {2} + +outputcache_duration_invalid = {0}.Duration must be an integer no less than 0. + +stack_data_not_iterable = TStack can only fetch data from an array or a traversable object. +stack_empty = TStack is empty. + +queue_data_not_iterable = TQueue can only fetch data from an array or a traversable object. +queue_empty = TQueue is empty. + +callback_not_support_no_priority_state_update = Callback request does not support unprioritized pagestate update. +callback_invalid_callback_options = '{1}' is not a valid TCallbackOptions control for Callback control '{0}'. +callback_invalid_clientside_options = Callback ClientSide property must be either a string that is the ID of a TCallbackOptions control or an instance of TCallbackClientSideOptions.======= +callback_not_support_no_priority_state_update = Callback request does not support unprioritized pagestate update. + +xmltransform_xslextension_required = TXmlTransform require the PHP's XSL extension +xmltransform_transformpath_invalid = TransformPath '{0}' is invalid. +xmltransform_documentpath_invalid = DocumentPath '{0}' is invalid. +xmltransform_transform_required = Either TransformContent or TransformPath property must be set. diff --git a/framework/Web/Javascripts/extended/base.js b/framework/Web/Javascripts/extended/base.js index 53856684..d7fabdd0 100644 --- a/framework/Web/Javascripts/extended/base.js +++ b/framework/Web/Javascripts/extended/base.js @@ -26,4 +26,99 @@ Class.extend = function(base, definition) if(definition) Object.extend(component.prototype, definition); return component; -} \ No newline at end of file +} + +/* + Base, version 1.0.1 + Copyright 2006, Dean Edwards + License: http://creativecommons.org/licenses/LGPL/2.1/ +*/ + +function Base() { +}; + +Base.version = "1.0.1"; + +Base.prototype = { + extend: function(source, value) { + var extend = Base.prototype.extend; + if (arguments.length == 2) { + var ancestor = this[source]; + // overriding? + if ((ancestor instanceof Function) && (value instanceof Function) && + ancestor.valueOf() != value.valueOf() && /\binherit\b/.test(value)) { + var method = value; + value = function() { + var previous = this.inherit; + this.inherit = ancestor; + var returnValue = method.apply(this, arguments); + this.inherit = previous; + return returnValue; + }; + // point to the underlying method + value.valueOf = function() { + return method; + }; + value.toString = function() { + return String(method); + }; + } + return this[source] = value; + } else if (source) { + var _prototype = {toSource: null}; + // do the "toString" and other methods manually + var _protected = ["toString", "valueOf"]; + // if we are prototyping then include the constructor + if (Base._prototyping) _protected[2] = "constructor"; + for (var i = 0; (name = _protected[i]); i++) { + if (source[name] != _prototype[name]) { + extend.call(this, name, source[name]); + } + } + // copy each of the source object's properties to this object + for (var name in source) { + if (!_prototype[name]) { + extend.call(this, name, source[name]); + } + } + } + return this; + }, + + inherit: function() { + // call this method from any other method to invoke that method's ancestor + } +}; + +Base.extend = function(_instance, _static) { + var extend = Base.prototype.extend; + if (!_instance) _instance = {}; + // create the constructor + if (_instance.constructor == Object) { + _instance.constructor = new Function; + } + // build the prototype + Base._prototyping = true; + var _prototype = new this; + extend.call(_prototype, _instance); + var constructor = _prototype.constructor; + _prototype.constructor = this; + delete Base._prototyping; + // create the wrapper for the constructor function + var klass = function() { + if (!Base._prototyping) constructor.apply(this, arguments); + this.constructor = klass; + }; + klass.prototype = _prototype; + // build the class interface + klass.extend = this.extend; + klass.toString = function() { + return String(constructor); + }; + extend.call(klass, _static); + // support singletons + var object = constructor ? klass : _prototype; + // class initialisation + if (object.init instanceof Function) object.init(); + return object; +}; \ No newline at end of file diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js index 87fd69a6..5f52fece 100644 --- a/framework/Web/Javascripts/js/prado.js +++ b/framework/Web/Javascripts/js/prado.js @@ -15,7 +15,11 @@ Function.prototype.bindEvent=function() Class.extend=function(base,definition) {var component=Class.create();Object.extend(component.prototype,base.prototype);if(definition) Object.extend(component.prototype,definition);return component;} -Object.extend(String.prototype,{gsub:function(pattern,replacement){var result='',source=this,match;replacement=arguments.callee.prepareReplacement(replacement);while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=(replacement(match)||'').toString();source=source.slice(match.index+match[0].length);}else{result+=source,source='';}} +function Base(){};Base.version="1.0.1";Base.prototype={extend:function(source,value){var extend=Base.prototype.extend;if(arguments.length==2){var ancestor=this[source];if((ancestor instanceof Function)&&(value instanceof Function)&&ancestor.valueOf()!=value.valueOf()&&/\binherit\b/.test(value)){var method=value;value=function(){var previous=this.inherit;this.inherit=ancestor;var returnValue=method.apply(this,arguments);this.inherit=previous;return returnValue;};value.valueOf=function(){return method;};value.toString=function(){return String(method);};} +return this[source]=value;}else if(source){var _prototype={toSource:null};var _protected=["toString","valueOf"];if(Base._prototyping)_protected[2]="constructor";for(var i=0;(name=_protected[i]);i++){if(source[name]!=_prototype[name]){extend.call(this,name,source[name]);}} +for(var name in source){if(!_prototype[name]){extend.call(this,name,source[name]);}}} +return this;},inherit:function(){}};Base.extend=function(_instance,_static){var extend=Base.prototype.extend;if(!_instance)_instance={};if(_instance.constructor==Object){_instance.constructor=new Function;} +Base._prototyping=true;var _prototype=new this;extend.call(_prototype,_instance);var constructor=_prototype.constructor;_prototype.constructor=this;delete Base._prototyping;var klass=function(){if(!Base._prototyping)constructor.apply(this,arguments);this.constructor=klass;};klass.prototype=_prototype;klass.extend=this.extend;klass.toString=function(){return String(constructor);};extend.call(klass,_static);var object=constructor?klass:_prototype;if(object.init instanceof Function)object.init();return object;};Object.extend(String.prototype,{gsub:function(pattern,replacement){var result='',source=this,match;replacement=arguments.callee.prepareReplacement(replacement);while(source.length>0){if(match=source.match(pattern)){result+=source.slice(0,match.index);result+=(replacement(match)||'').toString();source=source.slice(match.index+match[0].length);}else{result+=source,source='';}} return result;},sub:function(pattern,replacement,count){replacement=this.gsub.prepareReplacement(replacement);count=count===undefined?1:count;return this.gsub(pattern,function(match){if(--count<0)return match[0];return replacement(match);});},scan:function(pattern,iterator){this.gsub(pattern,iterator);return this;},truncate:function(length,truncation){length=length||30;truncation=truncation===undefined?'...':truncation;return this.length>length?this.slice(0,length-truncation.length)+truncation:this;},strip:function(){return this.replace(/^\s+/,'').replace(/\s+$/,'');},stripTags:function(){return this.replace(/<\/?[^>]+>/gi,'');},stripScripts:function(){return this.replace(new RegExp(Prototype.ScriptFragment,'img'),'');},extractScripts:function(){var matchAll=new RegExp(Prototype.ScriptFragment,'img');var matchOne=new RegExp(Prototype.ScriptFragment,'im');return(this.match(matchAll)||[]).map(function(scriptTag){return(scriptTag.match(matchOne)||['',''])[1];});},evalScripts:function(){return this.extractScripts().map(function(script){return eval(script)});},escapeHTML:function(){var div=document.createElement('div');var text=document.createTextNode(this);div.appendChild(text);return div.innerHTML;},unescapeHTML:function(){var div=document.createElement('div');div.innerHTML=this.stripTags();return div.childNodes[0]?div.childNodes[0].nodeValue:'';},toQueryParams:function(){var pairs=this.match(/^\??(.*)$/)[1].split('&');return pairs.inject({},function(params,pairString){var pair=pairString.split('=');params[pair[0]]=pair[1];return params;});},toArray:function(){return this.split('');},camelize:function(){var oStringList=this.split('-');if(oStringList.length==1)return oStringList[0];var camelizedString=this.indexOf('-')==0?oStringList[0].charAt(0).toUpperCase()+oStringList[0].substring(1):oStringList[0];for(var i=1,len=oStringList.length;i 0) this.updateChoices(result); } -}); \ No newline at end of file +}); diff --git a/framework/Web/UI/TClientScriptManager.php b/framework/Web/UI/TClientScriptManager.php index a4644e26..eb5e445a 100644 --- a/framework/Web/UI/TClientScriptManager.php +++ b/framework/Web/UI/TClientScriptManager.php @@ -122,6 +122,9 @@ class TClientScriptManager extends TApplicationComponent $this->_page->registerCachingAction('Page.ClientScript','registerPradoScript',$params); } + /** + * Registers a prado javascript library to be loaded. + */ private function registerPradoScriptInternal($name) { if(!isset($this->_registeredPradoScripts[$name])) @@ -142,6 +145,10 @@ class TClientScriptManager extends TApplicationComponent } } + /** + * Renders the