The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

willy (8) [Avatar] Offline
#1
Hello,

In the sample application (app.extjsinaction.com),
departmentList.js contains the following code:
buildStore : function() {
return {
xtype : 'jsonstore',
autoLoad : this.autoLoadStore,
....

The autoLoadStore parameter is only set in EmployeeAssociationWindow.js
However, when I click the "Manage Departments" button, the DepartmentList is loaded.

This looks like magic to me. I tried to adapt the example to my own test case, but cannot get the list to load this way.
It loads only when I change "autoLoad: this.autoLoadStore" to "autoLoad: true".

Can someone explain by what mechanism the department list loads in the "Manage Departments" window in the example application?

Kind regards,
Willy.

PS: I'm using Ext 3.2.1
sethlegoauld (1) [Avatar] Offline
#2
Re: autoLoadStore in DepartmentList.js
I'm having a similar problem here...
jesus.garcia (463) [Avatar] Offline
#3
Re: autoLoadStore in DepartmentList.js
Willy, please accept my apology for dropping the ball on this and not responding sooner. I spent some time on it, got distracted and literally forgot. Again, I apologize.


Seth, thanks for responding to this thread. Your post served as a reminder.

Here's how it works (*And yes the Manuscript is a bit fuzzy*):

- autoLoadStore is a config option that is setup but not used. I recall originally having code configured to use it. However, I later changed it to not.

- To understand the call chain, you must focus your attention at workspace.js. This is the app view manager.

- Look at switchToCard. It will contain a newPanel.cleanSlate() call (around line 179).

- Look at the DepartmentManager.js file. This implements an instance of DepartmentList.

- Scroll down to the end of the class declaration and look at the cleanSlate method. This method will purge the form and call the departmentList's refreshView method.

- The deparmentLists refreshView method is what will invoke a store load.

At this late in the game, i'm not too sure if i can fix the manuscript.

I hope this clears things up.