Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 233685
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T20:07:23+00:00 2026-05-11T20:07:23+00:00

I am having a few problems with Dojo Filtering Selects when using the Zend

  • 0

I am having a few problems with Dojo Filtering Selects when using the Zend Framework Forms and need some help to find out what I have missed as this is driving me mad.

I am currently getting this errors in firebug:

  • dojo.data is undefined
  • dojo.data.ItemFileReadStore is not a constructor

Below is the code that I am using to create the filter select and provide the json data to the calling controller.

Zend_Form Element (Dojo Enabled)

$industry = new Zend_Dojo_Form_Element_FilteringSelect('industry');
    $industry->setAutocomplete(true)
    ->setStoreId('industrystore')
    ->setStoreType('dojo.data.ItemFileReadStore')
    ->setStoreParams(array('url' => $baseUrl.'/dojo/industry'))
    ->setAttrib("searchAttr", "title")
    ->setRequired(true)
    ->removeDecorator('DtDdWrapper')
    ->removeDecorator('label')
    ->removeDecorator('HtmlTag');

Dojo Controller

public function industryAction(){

    $db = Zend_Db::factory($this->config->database);

    $result = $db->fetchAll("SELECT * FROM industries");
    $data = new Zend_Dojo_Data('industryid', $result);
    $this->_helper->autoCompleteDojo($data);

    $db->closeConnection();
}

The annoying thing is all my other Dojo elements on this form and other forms work well it is just whenever I do Filtering Selects that I hit these problems, and this problem causes all the other elements in a form to fail too.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T20:07:24+00:00Added an answer on May 11, 2026 at 8:07 pm

    The problem is actually with how Zend Framework initializes the dijits and data stores before the toolkit is fully loaded, in this case specifically the methods assigning the store to the dijit. I ran into this issue as well and found the best way to work around the issues was to either pass the data store from the controller to a JavaScript variable defined in the view or do what your did with a specific autocomplete action. Based on your example I would make the following changes.

    In your form I would simplify the element:

    $industry = new Zend_Dojo_Form_Element_FilteringSelect('industry');
        $industry->setAutocomplete(true)
        ->setRequired(true)
        ->removeDecorator('DtDdWrapper')
        ->removeDecorator('label')
        ->removeDecorator('HtmlTag');
    

    In your view you want to connect the store to your dijit and make sure that you have loaded the dojo.data.ItemFileReadStore module:

    <?php $this->dojo()->onLoadCaptureStart()?>
        function(){
            dijit.byId('industry').store = new dojo.data.ItemFileReadStore({ url: '/controller/industry' });
        }
    <?php 
        $this->dojo()->onLoadCaptureEnd();
        $this->dojo()->requireModule('dojo.data.ItemFileReadStore');
    ?>
    

    As I mentioned I ran into a similar issue which I answered here . Another issue I discovered is that the data store does not like dealing with labels declared anything other than “name” for the label declaration in the Zend_Dojo_Data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 107k
  • Answers 107k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Events are raised synchronously by default. Since MulticastDelegates are designed… May 11, 2026 at 9:04 pm
  • Editorial Team
    Editorial Team added an answer SOAP is encapsulated with the Web Service model in ASP.Net.… May 11, 2026 at 9:04 pm
  • Editorial Team
    Editorial Team added an answer The reason why your example doesn't work is that you're… May 11, 2026 at 9:04 pm

Related Questions

I am trying to run a simple SQL statement with DB2 and am having
I am having several problems with tessdll in Visual Studio 2008. FYI, I created
I am having trouble with my Visual Studio 2005 IntelliSense for some time now.
I am attempting to link an application with g++ on this Debian lenny system.
I am calling a vendor's Java API, and on some servers it appears that

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.