CodeIgniter + ExtJS 2.2 ? Tutorial? |
[eluser]aexer[/eluser]
Hiho everybody I'm searching for a tutorial or a video tutorial to integrate ExtJS 2.2 into CodeIgniter. With the Tutorial on the site of extjs it won't work. Has anybody a good tutorial for grids and so on? Thx for help aexer
[eluser]Mirage[/eluser]
I don't have a tutorial, but I've integrating with Ext since before 2.0. I really don't see what's to integrate? ExtJs runs on the client and makes HTTP Requests. On the CI side of thing you do the same thing you'd do for regular browser requests. Except that your output is often not html, but rather JSON or XML. Either way - CI itself has little to do with any of this...
[eluser]Mirage[/eluser]
Smart Quotes? What Smart Quotes? :red: Thanks for the heads up.
[eluser]pistolPete[/eluser]
[quote author="aexer" date="1234466325"]I'm searching for a tutorial or a video tutorial to integrate ExtJS 2.2 into CodeIgniter[/quote] What are you trying to do exactly? I don't know about a specific tutorial, but have a look at the JSON-Helper, which provides you a possibility to handle communication with ExtJS.
[eluser]aexer[/eluser]
I want to create some grids with extjs and load the data with codeigniter in it. I see the head of the extjs grid table, but no data inserted. Above i see the json encoded strin like this. Code: ({"total":"11","results":[{"man_id":"1","firmenname":"Aexer.com - Webdesign & Coding","name":"Exer","vorname":"Andi","ort":"Felsberg"},{"man_id":"2","firmenname":"Bijouterie Exer-Salzgeber","name":"Salzgeber","vorname":"Menga","ort":"St. Moritz"},{"man_id":"3","firmenname":"Hubbi GMBH","name":"Dietrich","vorname":"Hubertus","ort":"Chur"},{"man_id":"6","firmenname":"Exerson Maschinen","name":"Exer","vorname":"Rolf","ort":"St.Gallen"},{"man_id":"7","firmenname":"Tschie","name":"Heller","vorname":"Marco","ort":"M\u00fcnchen"},{"man_id":"9","firmenname":"adsf","name":"asdf","vorname":"asdf","ort":"Dresden"},{"man_id":"10","firmenname":"Testkunde","name":"Test","vorname":"test","ort":"test"},{"man_id":"11","firmenname":"test","name":"testfeld1t","vorname":"test","ort":"st"},{"man_id":"12","firmenname":"Form Check Company","name":"Form","vorname":"Check","ort":"Name check"},{"man_id":"13","firmenname":"test","name":"test","vorname":"trest","ort":"test"},{"man_id":"14","firmenname":"xait.ch","name":"Eugster","vorname":"Max","ort":"Chur"}]}) extjs.php controller Code: class Extjs extends Controller m_extjs.php Code: class M_extjs extends Model grid.js Code: Ext.onReady(function(){ Any ideas? thx for help regards aexer
[eluser]aexer[/eluser]
Hello again So now extjs shows the header from the table.. but no data Screen of the Gridtest
[eluser]Mirage[/eluser]
I think you need to return a success flag in your response. So: Code: echo '({"total":"' . $rows . '","results":' . $data . ', success: true })';
[eluser]Mirage[/eluser]
Here's a compact example of how I put these things in my controllers: Code: function loadProperties() {
[eluser]aexer[/eluser]
I changed my code to your source.. But it won't work: Code: echo '({"total":"' . $rows . '","results":' . $data . ', success: true })'; |
Welcome Guest, Not a member yet? Register Sign In |