Simple things should be simple. Simples coisas deveriam ser simples. While starting with ExtJS, I saw a screencast on Grid which used a rather dubious method of making an AJAX call using an actual form element. Embora começando com ExtJS, eu vi um screencast Grid em que utilizou um método bastante duvidosa AJAX de fazer uma chamada utilizando uma forma real elemento. I hunted for a better option and I came across a better option - Ext.data.Connection. Eu caçados para uma melhor opção e eu vim através de uma melhor opção - Ext.data.Connection. Here’s an working example on how you can easily make AJAX call in ExtJS library. Aqui está um exemplo de trabalho sobre a forma como você pode facilmente fazer AJAX chamada em ExtJS biblioteca.

 var conn = new Ext.data.Connection(); conn.request({     url: 'history.jsp',     method: 'POST',     params: {"metaID": metaID, columnName: field},     success: function(responseObject) {         showHistoryDialog(responseObject.responseText);     },      failure: function() {          Ext.Msg.alert('Status', 'Unable to show history at this time. Please try again later.');      } }); Lig var = new Ext.data.Connection (); conn.request ((url: "history.jsp ', método:' POST ', parâm: (" metaID ": metaID, columnName: campo), sucesso: function (responseObject ) (ShowHistoryDialog (responseObject.responseText);), fracasso: function () (Ext.Msg.alert ( 'Estado', 'Não foi possível demonstrar história neste momento. Por favor, tente novamente mais tarde. ");))); 

Obviously you will have to implement the showHistoryDialog() method to your taste. Obviamente você terá que executar o showHistoryDialog () método para o seu gosto. Change the method names and url to suit your requirements. Altere o método nomes e url para atender às suas necessidades.

The downside is that it doesn’t display a loading message which you can easily implement. A desvantagem é que ela não será exibida uma mensagem carga que você pode facilmente implementar.

Update:
Here is the full code showing a Loading dialog too: Aqui está o código completo mostrando uma carga demasiado diálogo:

 var conn = new Ext.data.Connection();      // History buton click handler. Lig var = new Ext.data.Connection () / / História buton clique manipulador. It submits the request and displays the response using history dialog     function showHistory() {         if(record != null && field != null) {             metaID = record.get("MetaID");             grid.getGridEl().mask('Loading history...');             conn.request({                 url: 'history.jsp',                 method: 'POST',                 params: {"metaID": metaID, columnName: field},                 success: function(responseObject) {                     showHistoryDialog(responseObject.responseText);                     grid.getGridEl().unmask(true);                 },                 failure: function() {                     grid.getGridEl().unmask(true);                     Ext.Msg.alert('Status', 'Unable to show history at this time. Please try again later.');                 }             });         }     } Alega o pedido e exibe a resposta utilizando história diálogo função showHistory () (if (registro! = Null & & campo! = Null) (metaID = record.get ( "MetaID"); grid.getGridEl (). Máscara ( 'Carregando História ...'); conn.request ((url: "history.jsp ', método:' POST ', parâm: (" metaID ": metaID, columnName: campo), sucesso: function (responseObject) (showHistoryDialog (responseObject . responseText); grid.getGridEl (). desmascarar (true);), fracasso: function () (grid.getGridEl (). desmascarar (true); Ext.Msg.alert ( 'Estado', 'Não foi possível mostrar a história desta vez. Por favor, tente novamente mais tarde. ");)));)) 

Note: The code is used in a production environment to display historical information. Nota: O código é utilizado em um ambiente de produção para exibir informações históricas. The server side code as well as the implementation of of showHistoryDialog() is not provided as it is irrelevant to the context. O código lado do servidor, bem como a implementação da de showHistoryDialog () não está previsto e é irrelevante para o contexto.

With libraries like ExtJS and services like GMail, browser is now truly the king. ExtJS como com as bibliotecas e os serviços como o Gmail, do navegador está agora verdadeiramente o rei. You don’t need desktop applications for most purposes. Você não precisa aplicações desktop para a maioria dos propósitos.