Librairie PHP-ext ?

Librairie PHP-ext ? - PHP - Programmation

Marsh Posté le 12-05-2009 à 21:03:12    

Bonjour,
 
J'ai récemment découvert la librairie php-ext :
http://php-ext.quimera-solutions.c [...] rm/dynamic
 
J'essaye donc un des exemples (celui du lien ci dessus).
 
Mon fichier php est dans un dossier src, j'ai donc modifié la première ligne de l'exemple (disponible dans le lien en haut a droite "view source" ).
 
Voici mon fichier php :

Code :
  1. <?php
  2. set_include_path(get_include_path().PATH_SEPARATOR.realpath('../php-ext/library'));
  3. include_once 'PhpExt/Javascript.php';
  4. PhpExt_Javascript::sendContentType();
  5. include_once 'PhpExt/Ext.php';
  6. include_once 'PhpExt/Form/FormPanel.php';
  7. include_once 'PhpExt/Config/ConfigObject.php';
  8. include_once 'PhpExt/Form/TextField.php';
  9. include_once 'PhpExt/Form/TimeField.php';
  10. include_once 'PhpExt/Form/FieldSet.php';
  11. include_once 'PhpExt/Form/HtmlEditor.php';
  12. include_once 'PhpExt/Button.php';
  13. include_once 'PhpExt/Panel.php';
  14. include_once 'PhpExt/TabPanel.php';
  15. include_once 'PhpExt/QuickTips.php';
  16. include_once 'PhpExt/Layout/ColumnLayout.php';
  17. include_once 'PhpExt/Layout/FormLayout.php';
  18. include_once 'PhpExt/Layout/FitLayout.php';
  19. include_once 'PhpExt/Layout/AnchorLayoutData.php';
  20. include_once 'PhpExt/Layout/ColumnLayoutData.php';
  21. //****************************** Simple Form
  22. $simple = new PhpExt_Form_FormPanel();
  23. $simple->setLabelWidth(75)
  24.        ->setUrl("save-form.php" )
  25.        ->setFrame(true)
  26.        ->setTitle("Simple Form" )
  27.        ->setBodyStyle("padding:5px 5px 0" )
  28.        ->setWidth(350)
  29.        ->setDefaults(new PhpExt_Config_ConfigObject(array("width"=>230)))
  30.        ->setDefaultType("textfield" );
  31.        
  32. $firstName = PhpExt_Form_TextField::createTextField("first","First Name" )
  33.                ->setAllowBlank(false);
  34. $lastName  = PhpExt_Form_TextField::createTextField("last","Last Name" );
  35. $company   = PhpExt_Form_TextField::createTextField("company","Company" );
  36. $email     = PhpExt_Form_TextField::createTextField("email","Email", null, PhpExt_Form_FormPanel::VTYPE_EMAIL);               
  37. $time      = PhpExt_Form_TimeField::createTimeField("time", "Time" )
  38.                ->setMinValue("8:00am" )
  39.                ->setMaxValue("6:00pm" );
  40. $simple->addItem($firstName)
  41.        ->addItem($lastName)
  42.        ->addItem($company)
  43.        ->addItem($email)
  44.        ->addItem($time);
  45.                
  46. $simple->addButton(PhpExt_Button::createTextButton("Save" ));
  47. $simple->addButton(PhpExt_Button::createTextButton("Cancel" ));
  48.        
  49. //****************************** Adding Fieldset
  50. $fsf = new PhpExt_Form_FormPanel();
  51. $fsf->setLabelWidth(75)
  52.        ->setUrl("save-form.php" )
  53.        ->setFrame(true)
  54.        ->setTitle("Simple Form with FieldSets" )
  55.        ->setBodyStyle("padding:5px 5px 0" )
  56.        ->setWidth(350);
  57. //- Fielset 1
  58. $fieldset1 = new PhpExt_Form_FieldSet();
  59. $fieldset1->setCheckboxToggle(true)
  60.           ->setTitle("User Information" )
  61.           ->setAutoHeight(true)
  62.           ->setDefaults(new PhpExt_Config_ConfigObject(array("width"=>210)))
  63.           ->setCollapsed(true);
  64. // Use the helper function to easily create fields to add them inline
  65. $fieldset1->addItem(PhpExt_Form_TextField::createTextField("first","First Name" )
  66.                       ->setAllowBlank(false))
  67.           ->addItem(PhpExt_Form_TextField::createTextField("last","Last Name" ))
  68.           ->addItem(PhpExt_Form_TextField::createTextField("company","Company" ))
  69.           ->addItem(PhpExt_Form_TextField::createTextField("email","Email" )
  70.                       ->setVType(PhpExt_Form_FormPanel::VTYPE_EMAIL));           
  71. $fsf->addItem($fieldset1);
  72. //- Fieldset 2
  73. $fieldset2 = new PhpExt_Form_FieldSet();
  74. $fieldset2->setTitle("Phone Number" )
  75.           ->setCollapsible(true)
  76.           ->setAutoHeight(true)
  77.           ->setDefaults(new PhpExt_Config_ConfigObject(array("width"=>210)))
  78.           ->addItem(PhpExt_Form_TextField::createTextField("home","Home" )
  79.                       ->setValue("(888) 555-1212" ))
  80.           ->addItem(PhpExt_Form_TextField::createTextField("business","Business" ))   
  81.           ->addItem(PhpExt_Form_TextField::createTextField("mobile","Mobile" ))
  82.           ->addItem(PhpExt_Form_TextField::createTextField("fax","Fax" ));
  83. $fsf->addItem($fieldset2);
  84. //- Buttons
  85. $fsf->addButton(PhpExt_Button::createTextButton("Save" ));
  86. $fsf->addButton(PhpExt_Button::createTextButton("Cancel" ));
  87. //****************************** A little more complex
  88. $top = new PhpExt_Form_FormPanel();
  89. $top->setLabelAlign(PhpExt_Form_FormPanel::LABEL_ALIGN_TOP)
  90.     ->setFrame(true)
  91.     ->setTitle("Multi Column, Nested Layouts and Anchoring" )
  92.     ->setBodyStyle("padding:5px 5px 0" )
  93.     ->setWidth(600);
  94.      
  95. $columnPanel = new PhpExt_Panel();
  96. // using ColumnLayout
  97. $columnPanel->setLayout(new PhpExt_Layout_ColumnLayout());
  98. $top->addItem($columnPanel);
  99. //- First column
  100. $firstColumn = new PhpExt_Panel();
  101. // Use FormLayout to enable field labels and autoarrange fields on the panel
  102. $firstColumn->setLayout(new PhpExt_Layout_FormLayout());
  103. // Anchor the field to 95% of the panel by setting AnchorLayoutData (FormLayout extends AnchorLayout)
  104. $firstColumn->addItem(
  105.             PhpExt_Form_TextField::createTextField("first","First Name" )
  106.                 ->setTabIndex(1),
  107.             new PhpExt_Layout_AnchorLayoutData("95%" )
  108.           )
  109.         ->addItem(
  110.             PhpExt_Form_TextField::createTextField("company","Company" )
  111.                 ->setTabIndex(3),
  112.             new PhpExt_Layout_AnchorLayoutData("95%" )
  113.           );
  114. // adds the panel as a 50% column using ColumnLayoutData           
  115. $columnPanel->addItem($firstColumn, new PhpExt_Layout_ColumnLayoutData(0.5));
  116. //- Second column
  117. $secondColumn = new PhpExt_Panel();
  118. $secondColumn->setLayout(new PhpExt_Layout_FormLayout())
  119.          ->addItem(
  120.              PhpExt_Form_TextField::createTextField("last","Last Name" )
  121.                  ->setTabIndex(2),
  122.              new PhpExt_Layout_AnchorLayoutData("95%" ))
  123.              ->addItem(
  124.              PhpExt_Form_TextField::createTextField("email","Email" )           
  125.                  ->setVType(PhpExt_Form_FormPanel::VTYPE_EMAIL)
  126.                  ->setTabIndex(4),
  127.              new PhpExt_Layout_AnchorLayoutData("95%" ));
  128. $columnPanel->addItem($secondColumn, new PhpExt_Layout_ColumnLayoutData(0.5));
  129. // Add an HtmlEditor directly to the form, underneath the two columns  
  130. $top->addItem(PhpExt_Form_HtmlEditor::createHtmlEditor("bio","Biography","bio" )
  131.                 ->setTabIndex(5)                               
  132.                 ->setHeight(200),
  133.               new PhpExt_Layout_AnchorLayoutData("98%" ));
  134. //- Buttons               
  135. $top->addButton(PhpExt_Button::createTextButton("Save" ));
  136. $top->addButton(PhpExt_Button::createTextButton("Cancel" ));
  137. //****************************** Form as Tabs
  138. $tabs = new PhpExt_Form_FormPanel();
  139. $tabs->setBorder(false)
  140.      ->setLabelWidth(75)
  141.      ->setWidth(350);
  142. $tabPanel = new PhpExt_TabPanel();
  143. $tabPanel->setActiveTab(0)
  144.          ->setDefaults(new PhpExt_Config_ConfigObject(array("autoHeight"=>true,"bodyStyle"=>"padding:10px" )));
  145. $detailsTab = new PhpExt_Panel();
  146. $detailsTab->setTitle("Personal Details" )
  147.        ->setLayout(new PhpExt_Layout_FormLayout())
  148.        ->setDefaults(new PhpExt_Config_ConfigObject(array("width"=>230)))
  149.        ->setDefaultType("textfield" )
  150.    ->addItem(PhpExt_Form_TextField::createTextField("first","First Name" )
  151.                ->setAllowBlank(false)
  152.                ->setValue("Jack" ))                
  153.        ->addItem(PhpExt_Form_TextField::createTextField("company","Company" )
  154.                    ->setValue("Slocum" ))
  155.        ->addItem(PhpExt_Form_TextField::createTextField("last","Last Name" )
  156.                    ->setValue("Ext JS" ))
  157.        ->addItem(PhpExt_Form_TextField::createTextField("email","Email" )
  158.                    ->setVType(PhpExt_Form_FormPanel::VTYPE_EMAIL));
  159. $phonesTab = new PhpExt_Panel();
  160. $phonesTab->setTitle("Phone Numbers" )
  161.           ->setLayout(new PhpExt_Layout_FormLayout())
  162.           ->setDefaults(new PhpExt_Config_ConfigObject(array("width"=>230)))
  163.           ->setDefaultType("textfield" )
  164.           ->addItem(PhpExt_Form_TextField::createTextField("home","Home" )
  165.                       ->setValue("(888) 555-1212" ))
  166.           ->addItem(PhpExt_Form_TextField::createTextField("business","Business" ))
  167.           ->addItem(PhpExt_Form_TextField::createTextField("mobile","Mobile" ))
  168.           ->addItem(PhpExt_Form_TextField::createTextField("fax","Fax" ));
  169. $tabPanel->addItem($detailsTab);
  170. $tabPanel->addItem($phonesTab);
  171. $tabs->addItem($tabPanel);
  172. $tabs->addButton(PhpExt_Button::createTextButton("Save" ));
  173. $tabs->addButton(PhpExt_Button::createTextButton("Cancel" ));
  174. //******************************* Form Tabs 2
  175. $tabs2 = new PhpExt_Form_FormPanel();
  176. $tabs2->setLabelAlign(PhpExt_Form_FormPanel::LABEL_ALIGN_TOP)
  177.       ->setTitle("Inner Tabs" )
  178.       ->setBodyStyle("padding:5px" )
  179.       ->setWidth(600);
  180. $columnPanel2 = new PhpExt_Panel();
  181. // using ColumnLayout
  182. $columnPanel2->setBorder(false)
  183.              ->setLayout(new PhpExt_Layout_ColumnLayout());
  184. $tabs2->addItem($columnPanel2);
  185. //- First column
  186. $firstColumn2 = new PhpExt_Panel();
  187. // Use FormLayout to enable field labels and autoarrange fields on the panel
  188. $firstColumn2->setBorder(false)
  189.              ->setLayout(new PhpExt_Layout_FormLayout());
  190.              
  191. // Anchor the field to 95% of the panel by setting AnchorLayoutData (FormLayout extends AnchorLayout)
  192. $firstColumn2->addItem(
  193.           PhpExt_Form_TextField::createTextField("first","First Name" ),
  194.           new PhpExt_Layout_AnchorLayoutData("95%" )
  195.         )
  196.       ->addItem(
  197.           PhpExt_Form_TextField::createTextField("company","Company" ),
  198.           new PhpExt_Layout_AnchorLayoutData("95%" )
  199.         );
  200. // adds the panel as a 50% column using ColumnLayoutData           
  201. $columnPanel2->addItem($firstColumn2, new PhpExt_Layout_ColumnLayoutData(0.5));
  202. //- Second column
  203. $secondColumn2 = new PhpExt_Panel();
  204. $secondColumn2->setBorder(false)
  205.               ->setLayout(new PhpExt_Layout_FormLayout())
  206.        ->addItem(
  207.             PhpExt_Form_TextField::createTextField("last","Last Name" ),
  208.             new PhpExt_Layout_AnchorLayoutData("95%" ))
  209.        ->addItem(
  210.             PhpExt_Form_TextField::createTextField("email","Email" )
  211.                 ->setVType(PhpExt_Form_FormPanel::VTYPE_EMAIL),
  212.             new PhpExt_Layout_AnchorLayoutData("95%" ));
  213. $columnPanel2->addItem($secondColumn2, new PhpExt_Layout_ColumnLayoutData(0.5));       
  214. //- Tab Panel
  215. $tabPanel2 = new PhpExt_TabPanel();
  216. $tabPanel2->setPlain(true)
  217.           ->setActiveTab(0)
  218.           ->setHeight(235)
  219.           ->setDefaults(new PhpExt_Config_ConfigObject(array("bodyStyle"=>"padding:10px" )));
  220. $detailsTab2 = new PhpExt_Panel();
  221. $detailsTab2->setTitle("Personal Details" )
  222.        ->setLayout(new PhpExt_Layout_FormLayout())
  223.        ->setDefaults(new PhpExt_Config_ConfigObject(array("width"=>230)))
  224.        ->setDefaultType("textfield" )
  225.     ->addItem(PhpExt_Form_TextField::createTextField("first","First Name" )
  226.                 ->setAllowBlank(false)
  227.                 ->setValue("Jack" ))                
  228.        ->addItem(PhpExt_Form_TextField::createTextField("company","Company" )
  229.                    ->setValue("Slocum" ))
  230.        ->addItem(PhpExt_Form_TextField::createTextField("last","Last Name" )
  231.                    ->setValue("Ext JS" ))
  232.        ->addItem(PhpExt_Form_TextField::createTextField("email","Email" )
  233.                    ->setVType(PhpExt_Form_FormPanel::VTYPE_EMAIL));
  234. $phonesTab2 = new PhpExt_Panel();
  235. $phonesTab2->setTitle("Phone Numbers" )
  236.           ->setLayout(new PhpExt_Layout_FormLayout())
  237.           ->setDefaults(new PhpExt_Config_ConfigObject(array("width"=>230)))
  238.           ->setDefaultType("textfield" )
  239.           ->addItem(PhpExt_Form_TextField::createTextField("home","Home" )
  240.                       ->setValue("(888) 555-1212" ))
  241.           ->addItem(PhpExt_Form_TextField::createTextField("business","Business" ))
  242.           ->addItem(PhpExt_Form_TextField::createTextField("mobile","Mobile" ))
  243.           ->addItem(PhpExt_Form_TextField::createTextField("fax","Fax" ));
  244. $bioTab = new PhpExt_Panel();
  245. $bioTab->setCssClass("x-plain" )
  246.        ->setTitle("Biography" )
  247.        ->setLayout(new PhpExt_Layout_FitLayout())
  248.        ->addItem(PhpExt_Form_HtmlEditor::createHtmlEditor("bio2","Biography","bio2" ));
  249. $tabPanel2->addItem($detailsTab2);
  250. $tabPanel2->addItem($phonesTab2);
  251. $tabPanel2->addItem($bioTab);
  252. $tabs2->addItem($tabPanel2);
  253. $tabs2->addButton(PhpExt_Button::createTextButton("Save" ));
  254. $tabs2->addButton(PhpExt_Button::createTextButton("Cancel" ));
  255. //****************************** onReady
  256. echo PhpExt_Ext::onReady(
  257. PhpExt_QuickTips::init(),
  258. PhpExt_Javascript::assign("bd","Ext.get('centercolumn')" ),
  259. PhpExt_Javascript::stm("bd.createChild({tag: 'h2', html: 'Form 1 - Very Simple'})" ),
  260. $simple->getJavascript(false, "simple" ),  
  261. $simple->render(PhpExt_Javascript::variable("Ext.get('centercolumn')" )),
  262. PhpExt_Javascript::stm("bd.createChild({tag: 'h2', html: 'Form 2 - Adding fieldsets'})" ),
  263. $fsf->getJavascript(false, "fsf" ),
  264. $fsf->render(PhpExt_Javascript::variable("Ext.get('centercolumn')" )),
  265. PhpExt_Javascript::stm("bd.createChild({tag: 'h2', html: 'Form 3 - A little more complex'})" ),
  266. $top->getJavascript(false, "top" ),
  267. $top->render(PhpExt_Javascript::variable("Ext.get('centercolumn')" )),
  268. PhpExt_Javascript::stm("bd.createChild({tag: 'h2', html: 'Form 4 - Forms can be a TabPanel...'})" ),
  269. $tabs->getJavascript(false, "tabs" ),
  270. $tabs->render(PhpExt_Javascript::variable("Ext.get('centercolumn')" )),
  271. PhpExt_Javascript::stm("bd.createChild({tag: 'h2', html: 'Form 5 - ... and forms can contain TabPanel(s)'})" ),
  272. $tabs2->getJavascript(false, "tabs2" ),
  273. $tabs2->render(PhpExt_Javascript::variable("Ext.get('centercolumn')" ))
  274. );
  275. ?>


 
Et dans ma page quand je l'affiche dans le navigateur, j'ai ceci :
 

Code :
  1. Ext.onReady(function(){
  2. Ext.QuickTips.init()
  3. bd=Ext.get('centercolumn');
  4. bd.createChild({tag: 'h2', html: 'Form 1 - Very Simple'});
  5. var simple = new Ext.form.FormPanel({items: [{name: 'first',fieldLabel: 'First Name',allowBlank: false,xtype: 'textfield'},{name: 'last',fieldLabel: 'Last Name',xtype: 'textfield'},{name: 'company',fieldLabel: 'Company',xtype: 'textfield'},{name: 'email',fieldLabel: 'Email',vtype: 'email',xtype: 'textfield'},{name: 'time',fieldLabel: 'Time',minValue: '8:00am',maxValue: '6:00pm',xtype: 'timefield'}],buttons: [{text: 'Save',xtype: 'button'},{text: 'Cancel',xtype: 'button'}],labelWidth: 75,url: 'save-form.php',frame: true,title: 'Simple Form',bodyStyle: 'padding:5px 5px 0',width: 350,defaults: {width: 230},defaultType: 'textfield'});
  6. simple.render(Ext.get('centercolumn'));
  7. bd.createChild({tag: 'h2', html: 'Form 2 - Adding fieldsets'});
  8. var fsf = new Ext.form.FormPanel({items: [{items: [{name: 'first',fieldLabel: 'First Name',allowBlank: false,xtype: 'textfield'},{name: 'last',fieldLabel: 'Last Name',xtype: 'textfield'},{name: 'company',fieldLabel: 'Company',xtype: 'textfield'},{name: 'email',fieldLabel: 'Email',vtype: 'email',xtype: 'textfield'}],checkboxToggle: true,title: 'User Information',autoHeight: true,defaults: {width: 210},collapsed: true,xtype: 'fieldset'},{items: [{name: 'home',fieldLabel: 'Home',value: '(888) 555-1212',xtype: 'textfield'},{name: 'business',fieldLabel: 'Business',xtype: 'textfield'},{name: 'mobile',fieldLabel: 'Mobile',xtype: 'textfield'},{name: 'fax',fieldLabel: 'Fax',xtype: 'textfield'}],title: 'Phone Number',collapsible: true,autoHeight: true,defaults: {width: 210},xtype: 'fieldset'}],buttons: [{text: 'Save',xtype: 'button'},{text: 'Cancel',xtype: 'button'}],labelWidth: 75,url: 'save-form.php',frame: true,title: 'Simple Form with FieldSets',bodyStyle: 'padding:5px 5px 0',width: 350});
  9. fsf.render(Ext.get('centercolumn'));
  10. bd.createChild({tag: 'h2', html: 'Form 3 - A little more complex'});
  11. var top = new Ext.form.FormPanel({items: [{items: [{items: [{name: 'first',fieldLabel: 'First Name',tabIndex: 1,xtype: 'textfield',anchor: '95%'},{name: 'company',fieldLabel: 'Company',tabIndex: 3,xtype: 'textfield',anchor: '95%'}],xtype: 'panel',columnWidth: 0.5,layout: 'form'},{items: [{name: 'last',fieldLabel: 'Last Name',tabIndex: 2,xtype: 'textfield',anchor: '95%'},{name: 'email',fieldLabel: 'Email',vtype: 'email',tabIndex: 4,xtype: 'textfield',anchor: '95%'}],xtype: 'panel',columnWidth: 0.5,layout: 'form'}],xtype: 'panel',layout: 'column'},{name: 'bio',fieldLabel: 'Biography',id: 'bio',tabIndex: 5,height: 200,xtype: 'htmleditor',anchor: '98%'}],buttons: [{text: 'Save',xtype: 'button'},{text: 'Cancel',xtype: 'button'}],labelAlign: 'top',frame: true,title: 'Multi Column, Nested Layouts and Anchoring',bodyStyle: 'padding:5px 5px 0',width: 600});
  12. top.render(Ext.get('centercolumn'));
  13. bd.createChild({tag: 'h2', html: 'Form 4 - Forms can be a TabPanel...'});
  14. var tabs = new Ext.form.FormPanel({items: {items: [{items: [{name: 'first',fieldLabel: 'First Name',allowBlank: false,value: 'Jack',xtype: 'textfield'},{name: 'company',fieldLabel: 'Company',value: 'Slocum',xtype: 'textfield'},{name: 'last',fieldLabel: 'Last Name',value: 'Ext JS',xtype: 'textfield'},{name: 'email',fieldLabel: 'Email',vtype: 'email',xtype: 'textfield'}],title: 'Personal Details',defaults: {width: 230},defaultType: 'textfield',xtype: 'panel',layout: 'form'},{items: [{name: 'home',fieldLabel: 'Home',value: '(888) 555-1212',xtype: 'textfield'},{name: 'business',fieldLabel: 'Business',xtype: 'textfield'},{name: 'mobile',fieldLabel: 'Mobile',xtype: 'textfield'},{name: 'fax',fieldLabel: 'Fax',xtype: 'textfield'}],title: 'Phone Numbers',defaults: {width: 230},defaultType: 'textfield',xtype: 'panel',layout: 'form'}],activeTab: 0,defaults: {autoHeight: true,bodyStyle: 'padding:10px'},xtype: 'tabpanel'},buttons: [{text: 'Save',xtype: 'button'},{text: 'Cancel',xtype: 'button'}],border: false,labelWidth: 75,width: 350});
  15. tabs.render(Ext.get('centercolumn'));
  16. bd.createChild({tag: 'h2', html: 'Form 5 - ... and forms can contain TabPanel(s)'});
  17. var tabs2 = new Ext.form.FormPanel({items: [{items: [{items: [{name: 'first',fieldLabel: 'First Name',xtype: 'textfield',anchor: '95%'},{name: 'company',fieldLabel: 'Company',xtype: 'textfield',anchor: '95%'}],border: false,xtype: 'panel',columnWidth: 0.5,layout: 'form'},{items: [{name: 'last',fieldLabel: 'Last Name',xtype: 'textfield',anchor: '95%'},{name: 'email',fieldLabel: 'Email',vtype: 'email',xtype: 'textfield',anchor: '95%'}],border: false,xtype: 'panel',columnWidth: 0.5,layout: 'form'}],border: false,xtype: 'panel',layout: 'column'},{items: [{items: [{name: 'first',fieldLabel: 'First Name',allowBlank: false,value: 'Jack',xtype: 'textfield'},{name: 'company',fieldLabel: 'Company',value: 'Slocum',xtype: 'textfield'},{name: 'last',fieldLabel: 'Last Name',value: 'Ext JS',xtype: 'textfield'},{name: 'email',fieldLabel: 'Email',vtype: 'email',xtype: 'textfield'}],title: 'Personal Details',defaults: {width: 230},defaultType: 'textfield',xtype: 'panel',layout: 'form'},{items: [{name: 'home',fieldLabel: 'Home',value: '(888) 555-1212',xtype: 'textfield'},{name: 'business',fieldLabel: 'Business',xtype: 'textfield'},{name: 'mobile',fieldLabel: 'Mobile',xtype: 'textfield'},{name: 'fax',fieldLabel: 'Fax',xtype: 'textfield'}],title: 'Phone Numbers',defaults: {width: 230},defaultType: 'textfield',xtype: 'panel',layout: 'form'},{items: {name: 'bio2',fieldLabel: 'Biography',id: 'bio2',xtype: 'htmleditor'},cls: 'x-plain',title: 'Biography',xtype: 'panel',layout: 'fit'}],plain: true,activeTab: 0,height: 235,defaults: {bodyStyle: 'padding:10px'},xtype: 'tabpanel'}],buttons: [{text: 'Save',xtype: 'button'},{text: 'Cancel',xtype: 'button'}],labelAlign: 'top',title: 'Inner Tabs',bodyStyle: 'padding:5px',width: 600});
  18. tabs2.render(Ext.get('centercolumn'));
  19. });


 
Donc quelque chose de très ressemblant a la fin de ce qu'il y a dans le php... Par contre je ne comprends pas pourquoi j'ai cela à la place du rendu voulu.
 
Pourrez vous m'aider ?
 
Merci d'avance.


---------------
Mon topic de vente http://forum.hardware.fr/hfr/Achat [...] 9217_1.htm  -- Mon Feed-Back : http://forum.hardware.fr/hfr/Achat [...] 0553_1.htm
Reply

Marsh Posté le 12-05-2009 à 21:03:12   

Reply

Marsh Posté le 12-05-2009 à 21:04:50    

C'est du JavaScript là qui est généré [:petrus dei] Fout des balises script autour ?

Reply

Marsh Posté le 13-05-2009 à 11:13:40    

Juste une note de fond :
Ext 3.0 est sur le point de sortir, tandis que la bibliothèque php-ext n'est plus mise à jour depuis l'été dernier...
 
à mon humble avis, il vaudrait mieux utiliser des outils maintenus. A ce titre, autant utiliser ext directement en javascript.

Reply

Marsh Posté le 13-05-2009 à 14:15:18    

Tout a fait d'accord pour ce qui est d'utiliser un outil maintenu...
 
Le problème c'est que je connais assez bien php, mais pas trop javasctipt...
 
Du coup ce que je trouvais pratique c'est de pouvoir générer le JS grace a php...


---------------
Mon topic de vente http://forum.hardware.fr/hfr/Achat [...] 9217_1.htm  -- Mon Feed-Back : http://forum.hardware.fr/hfr/Achat [...] 0553_1.htm
Reply

Marsh Posté le 13-05-2009 à 23:27:48    

la syntaxe 'ext' est pas excessivement compliquée.
Pour le javascript, ça vaut le coup de se plonger un peu dedans. Le "retour sur investissement" en utilisant ext vaut l'effort à mon avis.

Reply

Marsh Posté le 14-05-2009 à 09:30:16    

Bon et bien toujours curieux d'apprendre, je vais suivre ton conseil.
 
Par contre y a t il un doc ou des tutos qui soit en français ?
 
Merci.


---------------
Mon topic de vente http://forum.hardware.fr/hfr/Achat [...] 9217_1.htm  -- Mon Feed-Back : http://forum.hardware.fr/hfr/Achat [...] 0553_1.htm
Reply

Marsh Posté le 14-05-2009 à 13:18:04    

aucune idée.
Sinon c'est de l'anglais technique en général : pas bien compliqué, et y a des exemples avec le code source.

Reply

Marsh Posté le 14-05-2009 à 13:52:28    

Oui avec les exemples c'est pas mal...
 
Juste pas encore compris comment centrer un formulaire et comment communiquer avec la base de données...


---------------
Mon topic de vente http://forum.hardware.fr/hfr/Achat [...] 9217_1.htm  -- Mon Feed-Back : http://forum.hardware.fr/hfr/Achat [...] 0553_1.htm
Reply

Marsh Posté le 06-08-2009 à 16:39:31    

bonjour,
 
Je viens aussi de découvrir cette livrairie et j'ai le meme probleme que vous kolbek.
 
Pouvez-vous me dire comment vous avez fait pour avoir l'affichage voulu, et non pas le pavé de code tapé?
 
le serveur est bien lancé... et php est bien configuré
(j'arrive bien à afficher un simple <?php
  echo phpinfo();
?> )
 
merci d'avance


Message édité par hayabusa63 le 06-08-2009 à 16:52:08
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed