Changeset 959

Show
Ignore:
Timestamp:
05/29/08 10:43:30 (6 months ago)
Author:
bibo
Message:

#582 : jForms optional profile for dao datasource

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/jelix/docs/ns/jforms_1.1.rng

    r907 r959  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <grammar  
     2<grammar 
    33  xmlns="http://relaxng.org/ns/structure/1.0" 
    44  xmlns:ev="http://www.w3.org/2001/xml-events" 
     
    137137       <!--<element name="storage"> 
    138138           <attribute name="type"><choice><value>file</value><value>blob</value></choice></attribute> 
    139            <attribute name="value" />  
     139           <attribute name="value" /> 
    140140       </element> 
    141141       --> 
    142142     </element> 
    143143  </define> 
    144    
     144 
    145145  <define name="checkbox"> 
    146146     <element name="checkbox"> 
     
    232232     </optional> 
    233233  </define> 
    234    
     234 
    235235  <define name="UI.attr.readonly"> 
    236236      <optional><attribute name="readonly"><choice><value>true</value><value>false</value></choice></attribute></optional> 
     
    242242      <optional><attribute name="defaultvalue" /></optional> 
    243243  </define> 
    244    
     244 
    245245  <define name="attr.length"> 
    246246      <optional><attribute name="minlength"><data type="integer" /></attribute></optional> 
     
    320320                    </choice> 
    321321                </optional> 
     322                <optional><attribute name="profile" /></optional> 
    322323            </group> 
    323324            <attribute name="class" /> 
     
    394395 
    395396  --> 
    396    
     397 
    397398 
    398399</grammar> 
  • trunk/lib/jelix/docs/ns/jforms_1.1.rng

    r907 r959  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <grammar  
     2<grammar 
    33  xmlns="http://relaxng.org/ns/structure/1.0" 
    44  xmlns:ev="http://www.w3.org/2001/xml-events" 
     
    137137       <!--<element name="storage"> 
    138138           <attribute name="type"><choice><value>file</value><value>blob</value></choice></attribute> 
    139            <attribute name="value" />  
     139           <attribute name="value" /> 
    140140       </element> 
    141141       --> 
    142142     </element> 
    143143  </define> 
    144    
     144 
    145145  <define name="checkbox"> 
    146146     <element name="checkbox"> 
     
    232232     </optional> 
    233233  </define> 
    234    
     234 
    235235  <define name="UI.attr.readonly"> 
    236236      <optional><attribute name="readonly"><choice><value>true</value><value>false</value></choice></attribute></optional> 
     
    242242      <optional><attribute name="defaultvalue" /></optional> 
    243243  </define> 
    244    
     244 
    245245  <define name="attr.length"> 
    246246      <optional><attribute name="minlength"><data type="integer" /></attribute></optional> 
     
    320320                    </choice> 
    321321                </optional> 
     322                <optional><attribute name="profile" /></optional> 
    322323            </group> 
    323324            <attribute name="class" /> 
     
    394395 
    395396  --> 
    396    
     397 
    397398 
    398399</grammar> 
  • trunk/lib/jelix/docs/ns/jforms_1.1.rng

    r907 r959  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <grammar  
     2<grammar 
    33  xmlns="http://relaxng.org/ns/structure/1.0" 
    44  xmlns:ev="http://www.w3.org/2001/xml-events" 
     
    137137       <!--<element name="storage"> 
    138138           <attribute name="type"><choice><value>file</value><value>blob</value></choice></attribute> 
    139            <attribute name="value" />  
     139           <attribute name="value" /> 
    140140       </element> 
    141141       --> 
    142142     </element> 
    143143  </define> 
    144    
     144 
    145145  <define name="checkbox"> 
    146146     <element name="checkbox"> 
     
    232232     </optional> 
    233233  </define> 
    234    
     234 
    235235  <define name="UI.attr.readonly"> 
    236236      <optional><attribute name="readonly"><choice><value>true</value><value>false</value></choice></attribute></optional> 
     
    242242      <optional><attribute name="defaultvalue" /></optional> 
    243243  </define> 
    244    
     244 
    245245  <define name="attr.length"> 
    246246      <optional><attribute name="minlength"><data type="integer" /></attribute></optional> 
     
    320320                    </choice> 
    321321                </optional> 
     322                <optional><attribute name="profile" /></optional> 
    322323            </group> 
    323324            <attribute name="class" /> 
     
    394395 
    395396  --> 
    396    
     397 
    397398 
    398399</grammar> 
  • trunk/lib/jelix/docs/ns/jforms_1.1.rng

    r907 r959  
    11<?xml version="1.0" encoding="UTF-8"?> 
    2 <grammar  
     2<grammar 
    33  xmlns="http://relaxng.org/ns/structure/1.0" 
    44  xmlns:ev="http://www.w3.org/2001/xml-events" 
     
    137137       <!--<element name="storage"> 
    138138           <attribute name="type"><choice><value>file</value><value>blob</value></choice></attribute> 
    139            <attribute name="value" />  
     139           <attribute name="value" /> 
    140140       </element> 
    141141       --> 
    142142     </element> 
    143143  </define> 
    144    
     144 
    145145  <define name="checkbox"> 
    146146     <element name="checkbox"> 
     
    232232     </optional> 
    233233  </define> 
    234    
     234 
    235235  <define name="UI.attr.readonly"> 
    236236      <optional><attribute name="readonly"><choice><value>true</value><value>false</value></choice></attribute></optional> 
     
    242242      <optional><attribute name="defaultvalue" /></optional> 
    243243  </define> 
    244    
     244 
    245245  <define name="attr.length"> 
    246246      <optional><attribute name="minlength"><data type="integer" /></attribute></optional> 
     
    320320                    </choice> 
    321321                </optional> 
     322                <optional><attribute name="profile" /></optional> 
    322323            </group> 
    323324            <attribute name="class" /> 
     
    394395 
    395396  --> 
    396    
     397 
    397398 
    398399</grammar> 
  • trunk/lib/jelix/forms/jFormsCompiler_jf_1_1.class.php

    r907 r959  
    77* @contributor Uriel Corfa Emotic SARL 
    88* @copyright   2006-2008 Laurent Jouanneau 
    9 * @copyright   2007 Loic Mathaud, 2007 Dominique Papin 
     9* @copyright   2007 Loic Mathaud, 2007-2008 Dominique Papin 
    1010* @copyright   2007 Emotic SARL 
    1111* @link        http://www.jelix.org 
     
    102102 
    103103            if(isset($attrs['dao'])) { 
     104                if ( isset($attrs['profile'])) 
     105                    $profile = '\''.$attrs['profile'].'\''; 
     106                else 
     107                    $profile = '\'\''; 
    104108                if(isset($attrs['valueproperty'])) { 
    105109                    $daovalue = $attrs['valueproperty']; 
     
    119123 
    120124                $source[]='$ctrl->datasource = new jFormsDaoDatasource(\''.$attrs['dao'].'\',\''. 
    121                                 $attrs['method'].'\',\''.$attrs['labelproperty'].'\',\''.$daovalue.'\''.$criteria.');'; 
     125                                $attrs['method'].'\',\''.$attrs['labelproperty'].'\',\''.$daovalue.'\','.$profile.$criteria.');'; 
    122126                if($controltype == 'submit'){ 
    123127                    $source[]='$ctrl->standalone=false;'; 
  • trunk/lib/jelix/forms/jFormsCompiler_jf_1_1.class.php

    r907 r959  
    77* @contributor Uriel Corfa Emotic SARL 
    88* @copyright   2006-2008 Laurent Jouanneau 
    9 * @copyright   2007 Loic Mathaud, 2007 Dominique Papin 
     9* @copyright   2007 Loic Mathaud, 2007-2008 Dominique Papin 
    1010* @copyright   2007 Emotic SARL 
    1111* @link        http://www.jelix.org 
     
    102102 
    103103            if(isset($attrs['dao'])) { 
     104                if ( isset($attrs['profile'])) 
     105                    $profile = '\''.$attrs['profile'].'\''; 
     106                else 
     107                    $profile = '\'\''; 
    104108                if(isset($attrs['valueproperty'])) { 
    105109                    $daovalue = $attrs['valueproperty']; 
     
    119123 
    120124                $source[]='$ctrl->datasource = new jFormsDaoDatasource(\''.$attrs['dao'].'\',\''. 
    121                                 $attrs['method'].'\',\''.$attrs['labelproperty'].'\',\''.$daovalue.'\''.$criteria.');'; 
     125                                $attrs['method'].'\',\''.$attrs['labelproperty'].'\',\''.$daovalue.'\','.$profile.$criteria.');'; 
    122126                if($controltype == 'submit'){ 
    123127                    $source[]='$ctrl->standalone=false;'; 
  • trunk/lib/jelix/forms/jFormsCompiler_jf_1_1.class.php

    r907 r959  
    77* @contributor Uriel Corfa Emotic SARL 
    88* @copyright   2006-2008 Laurent Jouanneau 
    9 * @copyright   2007 Loic Mathaud, 2007 Dominique Papin 
     9* @copyright   2007 Loic Mathaud, 2007-2008 Dominique Papin 
    1010* @copyright   2007 Emotic SARL 
    1111* @link        http://www.jelix.org 
     
    102102 
    103103            if(isset($attrs['dao'])) { 
     104                if ( isset($attrs['profile'])) 
     105                    $profile = '\''.$attrs['profile'].'\''; 
     106                else 
     107                    $profile = '\'\''; 
    104108                if(isset($attrs['valueproperty'])) { 
    105109                    $daovalue = $attrs['valueproperty']; 
     
    119123 
    120124                $source[]='$ctrl->datasource = new jFormsDaoDatasource(\''.$attrs['dao'].'\',\''. 
    121                                 $attrs['method'].'\',\''.$attrs['labelproperty'].'\',\''.$daovalue.'\''.$criteria.');'; 
     125                                $attrs['method'].'\',\''.$attrs['labelproperty'].'\',\''.$daovalue.'\','.$profile.$criteria.');'; 
    122126                if($controltype == 'submit'){ 
    123127                    $source[]='$ctrl->standalone=false;'; 
  • trunk/lib/jelix/forms/jFormsCompiler_jf_1_1.class.php

    r907 r959  
    77* @contributor Uriel Corfa Emotic SARL 
    88* @copyright   2006-2008 Laurent Jouanneau 
    9 * @copyright   2007 Loic Mathaud, 2007 Dominique Papin 
     9* @copyright   2007 Loic Mathaud, 2007-2008 Dominique Papin 
    1010* @copyright   2007 Emotic SARL 
    1111* @link        http://www.jelix.org 
     
    102102 
    103103            if(isset($attrs['dao'])) { 
     104                if ( isset($attrs['profile'])) 
     105                    $profile = '\''.$attrs['profile'].'\''; 
     106                else 
     107                    $profile = '\'\''; 
    104108                if(isset($attrs['valueproperty'])) { 
    105109                    $daovalue = $attrs['valueproperty']; 
     
    119123 
    120124                $source[]='$ctrl->datasource = new jFormsDaoDatasource(\''.$attrs['dao'].'\',\''. 
    121                                 $attrs['method'].'\',\''.$attrs['labelproperty'].'\',\''.$daovalue.'\''.$criteria.');'; 
     125                                $attrs['method'].'\',\''.$attrs['labelproperty'].'\',\''.$daovalue.'\','.$profile.$criteria.');'; 
    122126                if($controltype == 'submit'){ 
    123127                    $source[]='$ctrl->standalone=false;'; 
  • trunk/lib/jelix/forms/jFormsDatasource.class.php

    r895 r959  
    44* @subpackage  forms 
    55* @author      Laurent Jouanneau 
    6 * @contributor 
     6* @contributor Dominique Papin 
    77* @copyright   2006-2007 Laurent Jouanneau 
     8* @copyright   2008 Dominique Papin 
    89* @link        http://www.jelix.org 
    910* @licence     http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file 
     
    1819interface jIFormsDatasource { 
    1920    /** 
    20      * load and returns data to fill a control. The returned array should be  
     21     * load and returns data to fill a control. The returned array should be 
    2122     * an associative array  key => label 
    2223     * @param jFormsBase $form  the form 
     
    2728    /** 
    2829     * Return the label corresponding to the given key 
    29      * @param string $key the key  
     30     * @param string $key the key 
    3031     * @return string the label 
    3132     */ 
     
    8081    protected $labelProperty; 
    8182    protected $keyProperty; 
     83    protected $profile; 
    8284 
    8385    protected $criteria; 
     
    8688    protected $dao = null; 
    8789 
    88     function __construct ($selector ,$method , $label, $key, $criteria=null, $criteriaFrom=null){ 
     90    function __construct ($selector ,$method , $label, $key, $profile='', $criteria=null, $criteriaFrom=null){ 
    8991        $this->selector  = $selector; 
     92        $this->profile = $profile; 
    9093        $this->method = $method ; 
    9194        $this->labelProperty = $label; 
     
    9396        $this->criteriaFrom = $criteriaFrom; 
    9497        if($key == ''){ 
    95             $rec = jDao::createRecord($this->selector); 
     98            $rec = jDao::createRecord($this->selector, $this->profile); 
    9699            $pfields = $rec->getPrimaryKeyNames(); 
    97100            $key = $pfields[0]; 
     
    102105    public function getData($form){ 
    103106        if($this->dao === null) 
    104             $this->dao = jDao::get($this->selector); 
     107            $this->dao = jDao::get($this->selector, $this->profile); 
    105108        if($this->criteria !== null) { 
    106109            $found = $this->dao->{$this->method}($this->criteria); 
     
    118121 
    119122    public function getLabel($key){ 
    120         if($this->dao === null) $this->dao = jDao::get($this->selector); 
     123        if($this->dao === null) $this->dao = jDao::get($this->selector, $this->profile); 
    121124        $rec = $this->dao->get($key); 
    122125        if($rec) 
     
    127130 
    128131} 
    129  
  • trunk/lib/jelix/forms/jFormsDatasource.class.php

    r895 r959  
    44* @subpackage  forms 
    55* @author      Laurent Jouanneau 
    6 * @contributor 
     6* @contributor Dominique Papin 
    77* @copyright   2006-2007 Laurent Jouanneau 
     8* @copyright   2008 Dominique Papin 
    89* @link        http://www.jelix.org 
    910* @licence     http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file 
     
    1819interface jIFormsDatasource { 
    1920    /** 
    20      * load and returns data to fill a control. The returned array should be  
     21     * load and returns data to fill a control. The returned array should be 
    2122     * an associative array  key => label 
    2223     * @param jFormsBase $form  the form 
     
    2728    /** 
    2829     * Return the label corresponding to the given key 
    29      * @param string $key the key  
     30     * @param string $key the key 
    3031     * @return string the label 
    3132     */ 
     
    8081    protected $labelProperty; 
    8182    protected $keyProperty; 
     83    protected $profile; 
    8284 
    8385    protected $criteria; 
     
    8688    protected $dao = null; 
    8789 
    88     function __construct ($selector ,$method , $label, $key, $criteria=null, $criteriaFrom=null){ 
     90    function __construct ($selector ,$method , $label, $key, $profile='', $criteria=null, $criteriaFrom=null){ 
    8991        $this->selector  = $selector; 
     92        $this->profile = $profile; 
    9093        $this->method = $method ; 
    9194        $this->labelProperty = $label; 
     
    9396        $this->criteriaFrom = $criteriaFrom; 
    9497        if($key == ''){ 
    95             $rec = jDao::createRecord($this->selector); 
     98            $rec = jDao::createRecord($this->selector, $this->profile); 
    9699            $pfields = $rec->getPrimaryKeyNames(); 
    97100            $key = $pfields[0]; 
     
    102105    public function getData($form){ 
    103106        if($this->dao === null) 
    104             $this->dao = jDao::get($this->selector); 
     107            $this->dao = jDao::get($this->selector, $this->profile); 
    105108        if($this->criteria !== null) { 
    106109            $found = $this->dao->{$this->method}($this->criteria); 
     
    118121 
    119122    public function getLabel($key){ 
    120         if($this->dao === null) $this->dao = jDao::get($this->selector); 
     123        if($this->dao === null) $this->dao = jDao::get($this->selector, $this->profile); 
    121124        $rec = $this->dao->get($key); 
    122125        if($rec) 
     
    127130 
    128131} 
    129  
  • trunk/lib/jelix/forms/jFormsDatasource.class.php

    r895 r959  
    44* @subpackage  forms 
    55* @author      Laurent Jouanneau 
    6 * @contributor 
     6* @contributor Dominique Papin 
    77* @copyright   2006-2007 Laurent Jouanneau 
     8* @copyright   2008 Dominique Papin 
    89* @link        http://www.jelix.org 
    910* @licence     http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file 
     
    1819interface jIFormsDatasource { 
    1920    /** 
    20      * load and returns data to fill a control. The returned array should be  
     21     * load and returns data to fill a control. The returned array should be 
    2122     * an associative array  key => label 
    2223     * @param jFormsBase $form  the form 
     
    2728    /** 
    2829     * Return the label corresponding to the given key 
    29      * @param string $key the key  
     30     * @param string $key the key 
    3031     * @return string the label 
    3132     */ 
     
    8081    protected $labelProperty; 
    8182    protected $keyProperty; 
     83    protected $profile; 
    8284 
    8385    protected $criteria; 
     
    8688    protected $dao = null; 
    8789 
    88     function __construct ($selector ,$method , $label, $key, $criteria=null, $criteriaFrom=null){ 
     90    function __construct ($selector ,$method , $label, $key, $profile='', $criteria=null, $criteriaFrom=null){ 
    8991        $this->selector  = $selector; 
     92        $this->profile = $profile; 
    9093        $this->method = $method ; 
    9194        $this->labelProperty = $label; 
     
    9396        $this->criteriaFrom = $criteriaFrom; 
    9497        if($key == ''){ 
    95             $rec = jDao::createRecord($this->selector); 
     98            $rec = jDao::createRecord($this->selector, $this->profile); 
    9699            $pfields = $rec->getPrimaryKeyNames(); 
    97100            $key = $pfields[0]; 
     
    102105    public function getData($form){ 
    103106        if($this->dao === null) 
    104             $this->dao = jDao::get($this->selector); 
     107            $this->dao = jDao::get($this->selector, $this->profile); 
    105108        if($this->criteria !== null) { 
    106109            $found = $this->dao->{$this->method}($this->criteria); 
     
    118121 
    119122    public function getLabel($key){ 
    120         if($this->dao === null) $this->dao = jDao::get($this->selector); 
     123        if($this->dao === null) $this->dao = jDao::get($this->selector, $this->profile); 
    121124        $rec = $this->dao->get($key); 
    122125        if($rec) 
     
    127130 
    128131} 
    129  
  • trunk/lib/jelix/forms/jFormsDatasource.class.php

    r895 r959  
    44* @subpackage  forms 
    55* @author      Laurent Jouanneau 
    6 * @contributor 
     6* @contributor Dominique Papin 
    77* @copyright   2006-2007 Laurent Jouanneau 
     8* @copyright   2008 Dominique Papin 
    89* @link        http://www.jelix.org 
    910* @licence     http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file 
     
    1819interface jIFormsDatasource { 
    1920    /** 
    20      * load and returns data to fill a control. The returned array should be  
     21     * load and returns data to fill a control. The returned array should be 
    2122     * an associative array  key => label 
    2223     * @param jFormsBase $form  the form 
     
    2728    /** 
    2829     * Return the label corresponding to the given key 
    29      * @param string $key the key  
     30     * @param string $key the key 
    3031     * @return string the label 
    3132     */ 
     
    8081    protected $labelProperty; 
    8182    protected $keyProperty; 
     83    protected $profile; 
    8284 
    8385    protected $criteria; 
     
    8688    protected $dao = null; 
    8789 
    88     function __construct ($selector ,$method , $label, $key, $criteria=null, $criteriaFrom=null){ 
     90    function __construct ($selector ,$method , $label, $key, $profile='', $criteria=null, $criteriaFrom=null){ 
    8991        $this->selector  = $selector; 
     92        $this->profile = $profile; 
    9093        $this->method = $method ; 
    9194        $this->labelProperty = $label; 
     
    9396        $this->criteriaFrom = $criteriaFrom; 
    9497        if($key == ''){ 
    95             $rec = jDao::createRecord($this->selector); 
     98            $rec = jDao::createRecord($this->selector, $this->profile); 
    9699            $pfields = $rec->getPrimaryKeyNames(); 
    97100            $key = $pfields[0]; 
     
    102105    public function getData($form){ 
    103106        if($this->dao === null) 
    104             $this->dao = jDao::get($this->selector); 
     107            $this->dao = jDao::get($this->selector, $this->profile); 
    105108        if($this->criteria !== null) { 
    106109            $found = $this->dao->{$this->method}($this->criteria); 
     
    118121 
    119122    public function getLabel($key){ 
    120         if($this->dao === null) $this->dao = jDao::get($this->selector); 
     123        if($this->dao === null) $this->dao = jDao::get($this->selector, $this->profile); 
    121124        $rec = $this->dao->get($key); 
    122125        if($rec) 
     
    127130 
    128131} 
    129  
  • trunk/testapp/modules/jelix_tests/tests/jforms.compiler.html_cli.php

    r907 r959  
    351351    <datasource dao="foo" method="bar" labelproperty="baz" valueproperty="plop" criteria="toto"/> 
    352352</listbox>', 
    353 80=>'<listbox ref="nom" xmlns="http://jelix.org/ns/forms/1.1" multiple="true"> 
     35380=>'<listbox ref="nom" xmlns="http://jelix.org/ns/forms/1.1"> 
     354    <label>Votre nom</label> 
     355    <datasource dao="foo" method="bar" labelproperty="baz" valueproperty="plop" profile="youp" criteria="toto"/> 
     356</listbox>', 
     35781=>'<listbox ref="nom" xmlns="http://jelix.org/ns/forms/1.1" multiple="true"> 
    354358    <label>Votre nom</label> 
    355359    <datasource dao="foo" method="bar" labelproperty="baz" valueproperty="plop" criteriafrom="prenom"/> 
    356360</listbox>', 
    357 81=>'<menulist ref="nom" xmlns="http://jelix.org/ns/forms/1.1"> 
     36182=>'<menulist ref="nom" xmlns="http://jelix.org/ns/forms/1.1"> 
    358362    <label>Votre nom</label> 
    359363    <datasource class="jelix_tests~mydatasource"/> 
     
    74174574=>'$ctrl= new jFormsControlcheckboxes(\'nom\'); 
    742746$ctrl->label=\'Votre nom\'; 
    743 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     747$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    744748$this->addControl($ctrl);', 
    74574975=>'$ctrl= new jFormsControlradiobuttons(\'nom\'); 
    746750$ctrl->label=\'Votre nom\'; 
    747 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     751$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    748752$this->addControl($ctrl);', 
    74975376=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    750754$ctrl->label=\'Votre nom\'; 
    751 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     755$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    752756$this->addControl($ctrl);', 
    75375777=>'$ctrl= new jFormsControlmenulist(\'nom\'); 
    754758$ctrl->label=\'Votre nom\'; 
    755 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     759$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    756760$this->addControl($ctrl);', 
    75776178=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    758762$ctrl->label=\'Votre nom\'; 
    759 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     763$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    760764$ctrl->multiple=true; 
    761765$this->addControl($ctrl);', 
    76276679=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    763767$ctrl->label=\'Votre nom\'; 
    764 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'toto\'); 
     768$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\',\'toto\'); 
    765769$this->addControl($ctrl);', 
    76677080=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    767771$ctrl->label=\'Votre nom\'; 
    768 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',null,\'prenom\'); 
     772$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'youp\',\'toto\'); 
     773$this->addControl($ctrl);', 
     77481=>'$ctrl= new jFormsControllistbox(\'nom\'); 
     775$ctrl->label=\'Votre nom\'; 
     776$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\',null,\'prenom\'); 
    769777$ctrl->multiple=true; 
    770778$this->addControl($ctrl);', 
    771 81=>'$ctrl= new jFormsControlmenulist(\'nom\'); 
     77982=>'$ctrl= new jFormsControlmenulist(\'nom\'); 
    772780$ctrl->label=\'Votre nom\'; 
    773781jClasses::inc(\'jelix_tests~mydatasource\'); 
  • trunk/testapp/modules/jelix_tests/tests/jforms.compiler.html_cli.php

    r907 r959  
    351351    <datasource dao="foo" method="bar" labelproperty="baz" valueproperty="plop" criteria="toto"/> 
    352352</listbox>', 
    353 80=>'<listbox ref="nom" xmlns="http://jelix.org/ns/forms/1.1" multiple="true"> 
     35380=>'<listbox ref="nom" xmlns="http://jelix.org/ns/forms/1.1"> 
     354    <label>Votre nom</label> 
     355    <datasource dao="foo" method="bar" labelproperty="baz" valueproperty="plop" profile="youp" criteria="toto"/> 
     356</listbox>', 
     35781=>'<listbox ref="nom" xmlns="http://jelix.org/ns/forms/1.1" multiple="true"> 
    354358    <label>Votre nom</label> 
    355359    <datasource dao="foo" method="bar" labelproperty="baz" valueproperty="plop" criteriafrom="prenom"/> 
    356360</listbox>', 
    357 81=>'<menulist ref="nom" xmlns="http://jelix.org/ns/forms/1.1"> 
     36182=>'<menulist ref="nom" xmlns="http://jelix.org/ns/forms/1.1"> 
    358362    <label>Votre nom</label> 
    359363    <datasource class="jelix_tests~mydatasource"/> 
     
    74174574=>'$ctrl= new jFormsControlcheckboxes(\'nom\'); 
    742746$ctrl->label=\'Votre nom\'; 
    743 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     747$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    744748$this->addControl($ctrl);', 
    74574975=>'$ctrl= new jFormsControlradiobuttons(\'nom\'); 
    746750$ctrl->label=\'Votre nom\'; 
    747 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     751$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    748752$this->addControl($ctrl);', 
    74975376=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    750754$ctrl->label=\'Votre nom\'; 
    751 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     755$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    752756$this->addControl($ctrl);', 
    75375777=>'$ctrl= new jFormsControlmenulist(\'nom\'); 
    754758$ctrl->label=\'Votre nom\'; 
    755 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     759$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    756760$this->addControl($ctrl);', 
    75776178=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    758762$ctrl->label=\'Votre nom\'; 
    759 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     763$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    760764$ctrl->multiple=true; 
    761765$this->addControl($ctrl);', 
    76276679=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    763767$ctrl->label=\'Votre nom\'; 
    764 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'toto\'); 
     768$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\',\'toto\'); 
    765769$this->addControl($ctrl);', 
    76677080=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    767771$ctrl->label=\'Votre nom\'; 
    768 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',null,\'prenom\'); 
     772$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'youp\',\'toto\'); 
     773$this->addControl($ctrl);', 
     77481=>'$ctrl= new jFormsControllistbox(\'nom\'); 
     775$ctrl->label=\'Votre nom\'; 
     776$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\',null,\'prenom\'); 
    769777$ctrl->multiple=true; 
    770778$this->addControl($ctrl);', 
    771 81=>'$ctrl= new jFormsControlmenulist(\'nom\'); 
     77982=>'$ctrl= new jFormsControlmenulist(\'nom\'); 
    772780$ctrl->label=\'Votre nom\'; 
    773781jClasses::inc(\'jelix_tests~mydatasource\'); 
  • trunk/testapp/modules/jelix_tests/tests/jforms.compiler.html_cli.php

    r907 r959  
    351351    <datasource dao="foo" method="bar" labelproperty="baz" valueproperty="plop" criteria="toto"/> 
    352352</listbox>', 
    353 80=>'<listbox ref="nom" xmlns="http://jelix.org/ns/forms/1.1" multiple="true"> 
     35380=>'<listbox ref="nom" xmlns="http://jelix.org/ns/forms/1.1"> 
     354    <label>Votre nom</label> 
     355    <datasource dao="foo" method="bar" labelproperty="baz" valueproperty="plop" profile="youp" criteria="toto"/> 
     356</listbox>', 
     35781=>'<listbox ref="nom" xmlns="http://jelix.org/ns/forms/1.1" multiple="true"> 
    354358    <label>Votre nom</label> 
    355359    <datasource dao="foo" method="bar" labelproperty="baz" valueproperty="plop" criteriafrom="prenom"/> 
    356360</listbox>', 
    357 81=>'<menulist ref="nom" xmlns="http://jelix.org/ns/forms/1.1"> 
     36182=>'<menulist ref="nom" xmlns="http://jelix.org/ns/forms/1.1"> 
    358362    <label>Votre nom</label> 
    359363    <datasource class="jelix_tests~mydatasource"/> 
     
    74174574=>'$ctrl= new jFormsControlcheckboxes(\'nom\'); 
    742746$ctrl->label=\'Votre nom\'; 
    743 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     747$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    744748$this->addControl($ctrl);', 
    74574975=>'$ctrl= new jFormsControlradiobuttons(\'nom\'); 
    746750$ctrl->label=\'Votre nom\'; 
    747 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     751$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    748752$this->addControl($ctrl);', 
    74975376=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    750754$ctrl->label=\'Votre nom\'; 
    751 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     755$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    752756$this->addControl($ctrl);', 
    75375777=>'$ctrl= new jFormsControlmenulist(\'nom\'); 
    754758$ctrl->label=\'Votre nom\'; 
    755 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     759$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    756760$this->addControl($ctrl);', 
    75776178=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    758762$ctrl->label=\'Votre nom\'; 
    759 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     763$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    760764$ctrl->multiple=true; 
    761765$this->addControl($ctrl);', 
    76276679=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    763767$ctrl->label=\'Votre nom\'; 
    764 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'toto\'); 
     768$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\',\'toto\'); 
    765769$this->addControl($ctrl);', 
    76677080=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    767771$ctrl->label=\'Votre nom\'; 
    768 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',null,\'prenom\'); 
     772$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'youp\',\'toto\'); 
     773$this->addControl($ctrl);', 
     77481=>'$ctrl= new jFormsControllistbox(\'nom\'); 
     775$ctrl->label=\'Votre nom\'; 
     776$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\',null,\'prenom\'); 
    769777$ctrl->multiple=true; 
    770778$this->addControl($ctrl);', 
    771 81=>'$ctrl= new jFormsControlmenulist(\'nom\'); 
     77982=>'$ctrl= new jFormsControlmenulist(\'nom\'); 
    772780$ctrl->label=\'Votre nom\'; 
    773781jClasses::inc(\'jelix_tests~mydatasource\'); 
  • trunk/testapp/modules/jelix_tests/tests/jforms.compiler.html_cli.php

    r907 r959  
    351351    <datasource dao="foo" method="bar" labelproperty="baz" valueproperty="plop" criteria="toto"/> 
    352352</listbox>', 
    353 80=>'<listbox ref="nom" xmlns="http://jelix.org/ns/forms/1.1" multiple="true"> 
     35380=>'<listbox ref="nom" xmlns="http://jelix.org/ns/forms/1.1"> 
     354    <label>Votre nom</label> 
     355    <datasource dao="foo" method="bar" labelproperty="baz" valueproperty="plop" profile="youp" criteria="toto"/> 
     356</listbox>', 
     35781=>'<listbox ref="nom" xmlns="http://jelix.org/ns/forms/1.1" multiple="true"> 
    354358    <label>Votre nom</label> 
    355359    <datasource dao="foo" method="bar" labelproperty="baz" valueproperty="plop" criteriafrom="prenom"/> 
    356360</listbox>', 
    357 81=>'<menulist ref="nom" xmlns="http://jelix.org/ns/forms/1.1"> 
     36182=>'<menulist ref="nom" xmlns="http://jelix.org/ns/forms/1.1"> 
    358362    <label>Votre nom</label> 
    359363    <datasource class="jelix_tests~mydatasource"/> 
     
    74174574=>'$ctrl= new jFormsControlcheckboxes(\'nom\'); 
    742746$ctrl->label=\'Votre nom\'; 
    743 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     747$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    744748$this->addControl($ctrl);', 
    74574975=>'$ctrl= new jFormsControlradiobuttons(\'nom\'); 
    746750$ctrl->label=\'Votre nom\'; 
    747 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     751$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    748752$this->addControl($ctrl);', 
    74975376=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    750754$ctrl->label=\'Votre nom\'; 
    751 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     755$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    752756$this->addControl($ctrl);', 
    75375777=>'$ctrl= new jFormsControlmenulist(\'nom\'); 
    754758$ctrl->label=\'Votre nom\'; 
    755 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     759$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    756760$this->addControl($ctrl);', 
    75776178=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    758762$ctrl->label=\'Votre nom\'; 
    759 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\'); 
     763$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\'); 
    760764$ctrl->multiple=true; 
    761765$this->addControl($ctrl);', 
    76276679=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    763767$ctrl->label=\'Votre nom\'; 
    764 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'toto\'); 
     768$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\',\'toto\'); 
    765769$this->addControl($ctrl);', 
    76677080=>'$ctrl= new jFormsControllistbox(\'nom\'); 
    767771$ctrl->label=\'Votre nom\'; 
    768 $ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',null,\'prenom\'); 
     772$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'youp\',\'toto\'); 
     773$this->addControl($ctrl);', 
     77481=>'$ctrl= new jFormsControllistbox(\'nom\'); 
     775$ctrl->label=\'Votre nom\'; 
     776$ctrl->datasource = new jFormsDaoDatasource(\'foo\',\'bar\',\'baz\',\'plop\',\'\',null,\'prenom\'); 
    769777$ctrl->multiple=true; 
    770778$this->addControl($ctrl);', 
    771 81=>'$ctrl= new jFormsControlmenulist(\'nom\'); 
     77982=>'$ctrl= new jFormsControlmenulist(\'nom\'); 
    772780$ctrl->label=\'Votre nom\'; 
    773781jClasses::inc(\'jelix_tests~mydatasource\');