Changeset 606
- Timestamp:
- 10/05/07 22:10:39 (1 year ago)
- Files:
-
- trunk/lib/jelix/forms/jFormsBase.class.php (modified) (4 diffs)
- trunk/lib/jelix/forms/jFormsBase.class.php (modified) (4 diffs)
- trunk/lib/jelix/forms/jFormsBuilderBase.class.php (modified) (1 diff)
- trunk/lib/jelix/forms/jFormsBuilderBase.class.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/jelix/forms/jFormsBase.class.php
r605 r606 215 215 * The form should contain a formId 216 216 * 217 * The Dao should map to an "association table" : its primary key should be 218 * the primary key stored in the formId + the field which will contain one of217 * The Dao should map to an "association table" : its primary key should be composed by 218 * the primary key stored in the formId (or the given primarykey) + the field which will contain one of 219 219 * the values of the control. If this order is not the same as defined into the dao, 220 220 * you should provide the list of property names which corresponds to the primary key … … 223 223 * @param string $controlName the name of the control 224 224 * @param string $daoSelector the selector of a dao file 225 * @param mixed $primaryKey the primary key if the form have no id. (optional) 225 226 * @param mixed $primaryKeyNames list of field corresponding to primary keys (optional) 226 227 * @param string $dbProfil the jDb profil to use with the dao 227 228 * @see jDao 228 229 */ 229 public function initControlFromDao($controlName, $daoSelector, $primaryKey Names=null, $dbProfil=''){230 public function initControlFromDao($controlName, $daoSelector, $primaryKey = null, $primaryKeyNames=null, $dbProfil=''){ 230 231 231 232 if(!$this->_controls[$controlName]->isContainer()){ … … 236 237 throw new jExceptionForms('jelix~formserr.formid.undefined.for.dao', array($controlName, $this->_sel)); 237 238 238 $primaryKey = $this->_container->formId; 239 if($primaryKey === null) 240 $primaryKey = $this->_container->formId; 239 241 240 242 if(!is_array($primaryKey)) … … 303 305 throw new jExceptionForms('jelix~formserr.formid.undefined.for.dao', array($controlName, $this->_sel)); 304 306 305 if( !$primaryKey)307 if($primaryKey === null) 306 308 $primaryKey = $this->_container->formId; 307 309 trunk/lib/jelix/forms/jFormsBase.class.php
r605 r606 215 215 * The form should contain a formId 216 216 * 217 * The Dao should map to an "association table" : its primary key should be 218 * the primary key stored in the formId + the field which will contain one of217 * The Dao should map to an "association table" : its primary key should be composed by 218 * the primary key stored in the formId (or the given primarykey) + the field which will contain one of 219 219 * the values of the control. If this order is not the same as defined into the dao, 220 220 * you should provide the list of property names which corresponds to the primary key … … 223 223 * @param string $controlName the name of the control 224 224 * @param string $daoSelector the selector of a dao file 225 * @param mixed $primaryKey the primary key if the form have no id. (optional) 225 226 * @param mixed $primaryKeyNames list of field corresponding to primary keys (optional) 226 227 * @param string $dbProfil the jDb profil to use with the dao 227 228 * @see jDao 228 229 */ 229 public function initControlFromDao($controlName, $daoSelector, $primaryKey Names=null, $dbProfil=''){230 public function initControlFromDao($controlName, $daoSelector, $primaryKey = null, $primaryKeyNames=null, $dbProfil=''){ 230 231 231 232 if(!$this->_controls[$controlName]->isContainer()){ … … 236 237 throw new jExceptionForms('jelix~formserr.formid.undefined.for.dao', array($controlName, $this->_sel)); 237 238 238 $primaryKey = $this->_container->formId; 239 if($primaryKey === null) 240 $primaryKey = $this->_container->formId; 239 241 240 242 if(!is_array($primaryKey)) … … 303 305 throw new jExceptionForms('jelix~formserr.formid.undefined.for.dao', array($controlName, $this->_sel)); 304 306 305 if( !$primaryKey)307 if($primaryKey === null) 306 308 $primaryKey = $this->_container->formId; 307 309 trunk/lib/jelix/forms/jFormsBuilderBase.class.php
r605 r606 122 122 } 123 123 echo '<script type="text/javascript"> 124 //< [CDATA[124 //<![CDATA[ 125 125 ', $this->getJavascriptCheck($params[0],$params[1]),' 126 126 //]]> trunk/lib/jelix/forms/jFormsBuilderBase.class.php
r605 r606 122 122 } 123 123 echo '<script type="text/javascript"> 124 //< [CDATA[124 //<![CDATA[ 125 125 ', $this->getJavascriptCheck($params[0],$params[1]),' 126 126 //]]>
