json - Issues connected with update JsonStore ExtJs 3.4 -
I would like to display a window with a description of the error after requesting the server from the combo box. If I have an exception, I put it in the json object and sent it in the cline side. Jason object is like this.
This is a part of my code where I send and receive data. I have tried to chew the data in every lighter of JsonStor, but this also does not work, there is a low inconsistency. Using ExtJs 3.4
this.folderNameStore = New Ext.data.JsonStore ({Proxy: New Ext.data.HttpProxy ({url: this.config.folderNamesPath, Method: 'by receiving "timeout: 120000}), listeners: {beforeload: {fn: function () {var informaticaRepositoryId = this.getInformaticaRepositoryId (); if (informaticaRepositoryId) {this.folderNameStore.setBaseParam ( 'informatica_repository_id', informaticaRepositoryId);}}, Scope: this}}, root: 'item', idProperty: 'folder_name', Fei LDS: ['folder_name']}); // Custom template resultTpl = new Ext.XTemplate (Search for '& lt; "." =' & Gt; TPL; & lt; div class = "informatica_workflow_command_folder_name" item searching-item x combo-list items "& gt; ; ',' & Lt; h2 class = "name" & gt; {folder_name} & lt; / h2 & gt; ',' / div> & lt; / tpl & gt; '); this.folderNameComboBox = new Ext.form.ComboBox ({allowBlank: false, applyTo: "informatica_workflow_command_folder_name", disabled: true, DisplayField: 'folder', ForceSelection: false, HideTrigger: false, mode: 'remote', ItemSelector ' div .informatica_workflow_command_folder_name finder item ', listClass:' job agents were told ', listEmptyText: helpsys.locale.javascript.no_matching_record, loadingText: helpsys.locale.common.searching, minChars: 4, submitValue: false, store this. Folder name file, tpl: resultTpl, trigger action: 'all', type is: true, maximum length: 80, maximum height: 400, auto-creation: {tag: 'input', type: 'text', max. Nbai:} '80, Manfild:' folder_name ', itemSelected: false, OLDVALUE:' ', listeners: {changes: function () {this.updateFolderNameComboBox ();}, select: function () {this.updateFolderNameComboBox ();}, KeyUp: function () {this. UpdateFolderNameComboBox ();}, scope: this}}); This.updateFolderNameComboBox = function () {if (this.folderNameComboBox.value == '') {this.workflowNameComboBox.markInvalid (); } Else {if (this.folderNameComboBoxValue! = This.folderNameComboBox.getValue ()) {this.workflowNameComboBox.markInvalid (); } This.workflowNameComboBox.store.removeAll (); This.workflowNameComboBox.lastQuery = Zero; This.workflowNameComboBox.enable (); This.folderNameComboBoxValue = this.folderNameComboBox.getValue (); }};
Add function that gets call to store load: Ext.data.StoreManager .lookup ('FolderNameStore'). ('Load', this.folderNameStoreLoaded);
And then just do something like extensions.getStore ('folderNameStore') in the function. Proxy.reader.jsonData
And then you can do your pop up notice in an if statement such as (success == "error") {Ext.MessageBox.alert ('Oh no' , 'Oh no.');}
Hope that helps.
Comments
Post a Comment