extjs - How do I Reload Ajax Call Parameters without Reloading the webpage -


I am working with Extenses 2.2.1 with Alfresco 3.2 Enterprise.

I would like to update that which handles authentication for Alfresco server on loaded components during login ticket that ends after a set time and this is why I update the ticket Will happen.

Options that do not appear to be viable for me (but please tell me what is wrong with me):

  1. Rebuild the components to reload the call parameters Load - I can not do this because the user that was first working on it is reset (such as tree panels are reloaded, grid filter reset, etc.). The actual webpage never reloads because everything uses AJAX calls to update things on the page.

  2. Create a global variable that stores a ticket and engages it with any AJAX calls as a call parameter - any components loaded during login Still will use the original ticket to call the server.

try something like this

  Ext.onReady (function () {var token = new Ext.util.MixedCollection (); token.add ('id', 'THE_TOKEN_ID'); Ext.ComponentMgr.register ('token', token);} );   

Attach Event Listener to Composite Collection which updates any component that focuses on the token.

  // Now all you need is var token for event listeners = Ext.getCmp ('token'); Var component = Ext.getCmp ('some_component_that_needs_ajax'); Token.one ('substituted', function (key, value, original) {if (key == 'id') {component.params.token_id = value; // update new value}});  

Whenever the token needs to be updated,

  var token = Ext.getCmp ('token'); Token Location ('id', 'THE_NEW_TOKEN_ID');  

What's going on here:

  1. You create mixed compilation to keep information about your token. Update
  2. token mixed code for any new token for the listener needs to be updated is.
  3. When you receive a new token ID, mixed selection to update the id key with the new token ID. Change location .
  4. Replace handler will fire, and listeners who update all dependent components.

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -