Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-03-2008, 12:18 PM
Junior Member
 
Join Date: Apr 2008
Posts: 2
Question ExtJS and ZF

I am currently building web application using ZF 1.5.1. I use ExtJS 2.0.2 as user interface. I would like to enable data-exchange between ZF and ExtJS. The schema is on attachment (zf-extjs.jpg).

I use Zend_Json::encode() to pass data to temporary data store and then
ExtJS loads that temporary data. My questions are :
1. Is there an easy way to pass data to ExtJS besides one above ?
2. How do I pass data (data that has been processed in Ext JS back to Zend
(DB) ?)
3. Is there any tutorial on the internet about this subject ?

Thanks,

Indrajit
Attached Images
File Type: jpg zf-extjs.jpg (6.9 KB, 20 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-17-2008, 08:54 AM
Junior Member
 
Join Date: Apr 2008
Posts: 6
Default

You could use XML, JSON, CSV... anything in fact!

I use ExtJS alot, but im only just learning ZF - it shouldnt be no differnt to creating a standard PHP page that just sits there until it is passed the data to process.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 06-13-2008, 12:16 PM
Junior Member
 
Join Date: Jun 2008
Posts: 1
Default Context Switching

I had trouble with ZFW and ExtJS integration, then I discovered a handy Action Helper in the Zend Framework's MVC which makes it stupid simple.

Context Switching provides a methodology for views to be rendered differently based on the value of the "format" request parameter. If you want data to render in the usual method, pass no "format" parameter and your view script will be called as usual. Call the action handler as "/controller/action/?format=json" and the variables that you have assigned to the the view will automatically be converted to JSON and sent to the browser.

From there it is just a matter of determining what keys ExtJS expects in the incoming JSON object. ExtJS doesn't always do the best job of documenting them!

Hope that helps!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:40 AM.