0
votes

I am using ExtJS 3.1.1. I have a tab-panel in the center region and another panel in the west region of a window. On 'beforeTabChange' event I'm removing and adding new contents to both tab-panel and panel. When I use tomcat server this is working fine at all machines. When I use JBoss server and access from the same machine there is no problem. But when I access the war deployed in JBoss server from a remote machine, when switching from a particular tab to other tabs, we need to click twice on the new tab. While clicking for the first time on a new tab, the west panels contents are emptied and the process stops there. This is not a browser problem or OS problem (I checked). What could be the reason ?

1
Are you sure that it is a problem about application server/servlet container? Because this is javascript, not depended on the serverside actually. Try to check what javascript code you have in your browser after the server gives you the response. Are there any difference? If there are no difference, it is not a problem of server. But if there is, then your deployment may have problems on JBossYasin Okumuş
Can you clarify if you are making any ajax calls within the beforeTabChange event handler? I'd highly recommend that you use the webkit inspector / firebug, and step through the code in the debugger, or add debugging code (console.log('here!')) style.cliftonc
@Yasin : Sure that the problem occurs only on the specified situation. There is no code change when checked through firebug. But when I stepped through firebug, it was giving "Script running long time" message. That does not occur in IE. I'm not using any ajax calls in beforetabchangeASN

1 Answers

1
votes

Note : Do not down vote or delete (to Moderators) if this does not answer the Question. I do not have enough reputation to share a comment above.

You need to increase the Ext.Ajax.timeout or more specifically Ext.Ajax.request's timeout value (see this) to a reasonable time that can process your request in a remote environment.

I had implemented an Ext.application to show my Gmail mails (using JavaMail API). Fetching data for the Grid had the same problem that you describe. On the first invocation, fetching of mail contents on the Server side took considerable time and hence the Grid would be empty. The next invocation would promptly bring up the data as I was caching the stuff on server side.

Also, have handlers for the failure of your Ajax.request which could help in identifying the issue.