Changeset 38

Show
Ignore:
Timestamp:
01/16/06 12:08:27 (3 years ago)
Author:
laurentj
Message:

nettoyage du squelette de base myapp et ajout d'une appli de test testapp

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/myapp/modules/myapp/actiongroups/main.ag.php

    r7 r38  
    1414 
    1515  function getDefault(){ 
    16  
    17       if($this->_get('output') == 'text'){ 
    18          $rep = $this->_getResponse('hellotext'); 
    19          $rep->content = 'Hello World !'; 
    20       }else{ 
    21  
    22          $rep = $this->_getResponse('hello'); 
    23          $rep->title = 'Hello From Jelix !'; 
    24          $rep->bodyTpl = 'myapp~hello'; 
    25          $rep->body->assign('person', $this->_get('person','You')); 
    26  
    27       } 
     16      $rep = $this->_getResponse('hello'); 
     17      $rep->bodyTpl = 'myapp~hello'; 
    2818      return $rep; 
    2919   } 
    30  
    31  
    32  
    33    function getTestDao(){ 
    34     if( $id=$this->_get('newid')){ 
    35         $dao = jDAO::get('config'); 
    36         $rec = jDAO::createRecord('config'); 
    37  
    38         $rec->ckey = $id; 
    39         $rec->cvalue=$this->_get('newvalue',''); 
    40         $dao->insert($rec); 
    41     } 
    42  
    43     $rep = $this->_getResponse('dao'); 
    44     $rep->title = 'This is a DAO Test'; 
    45     $rep->bodyTpl = 'myapp~main'; 
    46     $rep->body->assign('person','Laurent'); 
    47     $rep->body->assignZone('MAIN', 'test'); 
    48  
    49       return $rep; 
    50    } 
    51  
    5220 
    5321} 
  • trunk/myapp/modules/myapp/actions.xml

    r1 r38  
    55      <action name="default" ag="main" method="getDefault" > 
    66          <response default="true" name="hello" type="html" /> 
    7           <response  name="hellotext" type="text" /> 
    87      </action> 
    9  
    10       <action name="testdao" ag="main" method="getTestDao" > 
    11           <response default="true" name="dao" type="html" /> 
    12       </action> 
    13  
    148   </request> 
    15  
    16  
    17 <!--  <request type=""> 
    18       <pluginparam name="" value="" /> 
    19       <pluginparam name="" value="" /> 
    20       <response name="" type="" parameter="value" /> 
    21       <response name="" type="" parameter="value" /> 
    22  
    23       <action name="" ag="" method="" > 
    24           <pluginparam name="" value="" /> 
    25           <pluginparam name="" value="" /> 
    26           <response default="true" name="" type="html,redirect,xul.." parameter="value" /> 
    27           <response name="" type="" parameter="value" /> 
    28       </action> 
    29       </request> 
    30  
    31   --> 
    329</actions> 
  • trunk/myapp/modules/myapp/templates/hello.tpl

    r1 r38  
    1 <h1>Hello {$person|upper} !</h1> 
    2 <p>This is a sample html page generated by {@jelix~jelix.framework.name@}</p> 
     1<h1>MyApp</h1> 
     2<p>Si il n'y a pas de messages d'erreurs, l'application est bien install�/p> 
    33 
Download in other formats: Unified Diff Zip Archive