View Full Version : Combo store load problem

1 Jun 2011, 12:09 AM

I have several complex forms, where I need to load combo boxes where store is dependent from the loaded object.

Imagine this. I have project, where I have requirements and tasks. On the task form it is mandatory to select also requirement to which the task belongs. The case is that the combo box needs to be preloaded just with requirements belonging to specific project.

Here is the case. The task form window is independent and can be called from anywhere just with an uuid parameter. So in show event, when a task record is loaded the record is inspected for a project field and only then I can populate store of the requirement combo.

The thing is that combo fires store load, no matter if I set autoLoad: false on the store of requirement combo box. I solved the problem now with an event before load on requirement combo store like this:

listeners: {
beforeload : function(store, options) {
if (store.baseParams.project==null) return false;

What is the proper way to solve such things?

Here are two screenshots of an app.