Thanks for replying. 

The action view helper isn't really what i'm after - that would assume the
address needs to be assigned to the view, so the view helper can make the
lookup. What i'm after is a seperate request  to obtain the addresses
geocodes before it is inserted into the db, so all the information is
complete.

I rustled up something last night using the ActionStack controller helper:
from within my AddressController, before the address is inserted:

$response = $this->_helper->actionStack('address',
                                                                                
                        'Geocode',
                                                                                
                        'default',
                                                                                
                        array('address'=> $addressQueryString));

...which calls...

class GeocodeController extends Zend_Controller_Action 
        {
                public function addressAction(){
                        $viewRenderer =
Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
                        $viewRenderer->setNoRender(true);

                        $request = $this->getRequest();
                        echo $request->getParam('address');
                }
                
        }
So far i'm still reading up how to return a json response, but i'm also
figuring out how the actionstack really operates - it seems to discontinue
the current request and initiate a new one, instead of firing a kindof
subrequest - in fact i'm not even sure that's possible, but i'll keep on
reading. In the meantime, any pointers would be appreciated :)
-- 
View this message in context: 
http://www.nabble.com/calling-controller-action-and-getting-json-response-from-seperate-controller-tp25982645p26000753.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to