Hello !

 

Yes this answers my major question. The dojo part, I got it now in
/externals folder. In my 4th question, I meant list of all attributes of
resources, we do in application.ini like

 resources.frontController.controllerDirectory = APPLICATION_PATH
"/controllers"

 

Thanks & Regards,

 

Naimesh

 

From: coolcoder...@gmail.com [mailto:coolcoder...@gmail.com] On Behalf Of
devninja
Sent: Friday, July 31, 2009 7:27 PM
To: Naimesh.Trivedi (Gmail)
Subject: Re: [fw-general] Using Dojo with Zend

 

Hi, I'm going to try to give you the answers, if I am wrong, please someone
correct me.
 

 

1)    How do I use Ajax enabled to Zend_Form elements and validate my form
elements ?

Make your Form class extends Zend_Dojo_Form, some dijit elements have
lightweight client side validation,
 

2)  To use Dojo and Zend_Dojo_Form, do I need to put dojo.js, I could not
find it in Zend Framework 1.8.4, please guide me on this as following code I
found on manual calls it.


I think the "Full version" of Zend Framework comes with the dojo library,
but you can also use Dojo from CDNs, right now from Google and AOL.

In your view do this:
if ($this->dojo()->isEnabled()){
        $this->dojo()
                     ->setCdnBase(Zend_Dojo::CDN_BASE_GOOGLE)
                     ->addStyleSheetModule('dijit.themes.tundra');
        echo $this->dojo();
    }

3)    The name of the Zend has to include prefix Default_Form_XXXX where
Default_Form is prefix and keep XXXX.php having zend_form_xxxx class
extending Zend_Form_xxxx as not doing this gives error not able to find it
from view.


This is because that's the way the Autoloader works.
If you have the class "MyForm" in "/application/forms", you have to name it
"Default_Form_MyForm" 
in the file "/application/forms/MyForm.php" so you can write
$form = new Default_Form_MyForm(); 
anywhere on your code and it gets automatically loaded.

If you are writing a modular application, you should name your classes
starting with the name of your module instead of "Default_", 
for example if the class is "MyBlogForm" inside the "forms" folder of the
module "blog", the class should be "Blog_Form_MyBlogForm"
in the file  "blog/forms/MyBlogForm" (inside your modules folder).

4)    How do I know all resource.xxx attributes list 


I don't really know what do you mean by "resource.xxx" but I guess you are
talking about the resources in the bootstrap that gets
autoloaded (like the forms). I think the documentation for that needs to be
updated (maybe i'm wrong) here:
http://framework.zend.com/manual/en/zend.loader.autoloader-resource.html you
can check some of the resources, but if you want to see the currently used
in the framework, go to
Zend/Application/Module/Autoloader.php and in the method
"initDefaultResourceTypes" you can see the resource, the way it should be
named, 
and where it should be located. 

I hope this answers your questions.

 

bye.

Reply via email to