Author Topic: beginOperation and endOperation in 2.5.0 Beta  (Read 17380 times)

subes

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #15 on: July 07, 2009, 03:16:48 AM »
thanks :)

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #16 on: July 12, 2009, 12:19:47 PM »
We have released AjaxSwing 2.5.0 Beta2, which contains fixes for this issue and all problems you have reported on JDesktopPane rendering. Please download and verify that the fixes work for you.

subes

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #17 on: July 13, 2009, 10:39:07 AM »
Ok, first I occasionally get the following Exception with Beta2 (not limited to one specific application, also happens on resize sometimes):

Code: [Select]
2009/07/13 14:32:09:846 : [com.creamtec.ajaxswing.ClientAgentImpl$ClientAgentDelegate] Failed with exception
java.lang.ArrayIndexOutOfBoundsException: 6
at com.creamtec.ajaxswing.gui.html.DefaultJComponentUpdater.updateWindow(DefaultJComponentUpdater.java:542)
at com.creamtec.ajaxswing.gui.html.DefaultJComponentUpdater.updateComponent(DefaultJComponentUpdater.java:173)
at com.creamtec.ajaxswing.gui.ComponentProcessor.processComponent(ComponentProcessor.java:70)
at com.creamtec.core.awt.ContainerIterator.processComponent(ContainerIterator.java:82)
at com.creamtec.core.awt.ContainerIterator.iterate(ContainerIterator.java:62)
at com.creamtec.ajaxswing.gui.WindowUpdater.updateComponentTreeData(WindowUpdater.java:433)
at com.creamtec.ajaxswing.gui.WindowUpdater.updateComponents(WindowUpdater.java:225)
at com.creamtec.ajaxswing.gui.WindowUpdater.emulateRequest(WindowUpdater.java:185)
at com.creamtec.ajaxswing.core.AjaxSwingThread$1.run(AjaxSwingThread.java:193)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
java.lang.ArrayIndexOutOfBoundsException: 6
at com.creamtec.ajaxswing.gui.html.DefaultJComponentUpdater.updateWindow(DefaultJComponentUpdater.java:542)
at com.creamtec.ajaxswing.gui.html.DefaultJComponentUpdater.updateComponent(DefaultJComponentUpdater.java:173)
at com.creamtec.ajaxswing.gui.ComponentProcessor.processComponent(ComponentProcessor.java:70)
at com.creamtec.core.awt.ContainerIterator.processComponent(ContainerIterator.java:82)
at com.creamtec.core.awt.ContainerIterator.iterate(ContainerIterator.java:62)
at com.creamtec.ajaxswing.gui.WindowUpdater.updateComponentTreeData(WindowUpdater.java:433)
at com.creamtec.ajaxswing.gui.WindowUpdater.updateComponents(WindowUpdater.java:225)
at com.creamtec.ajaxswing.gui.WindowUpdater.emulateRequest(WindowUpdater.java:185)
at com.creamtec.ajaxswing.core.AjaxSwingThread$1.run(AjaxSwingThread.java:193)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Second, TabTest still does not work correctly because of isShowing giving wrong results. Try running the Sample Code and see in the log file that the isShowing results are always the same for both fields. Testing this behaviour in our framework does not work because of the above exception occuring quite early before being able to test.

Third, DesktopTest does not show the activated/deactivated title area text. Moving the window outside to left is also not fixed. Resizing the internalframes causes the above exception. The InternalFrameListener also still does not work.

Seems like Beta2 just made it worse. ^^

The forum doesn't let me upload attachments because it says the upload folder is full...

subes

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #18 on: July 13, 2009, 10:51:04 AM »
Forgot to mention: JComboBoxes still don't work in JInternalFrames.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #19 on: July 13, 2009, 11:22:06 PM »
It's quite clear that you have a stale browser cache, or outdated ajaxswing.js file. Please clear the cache completely and then try again. I've just retested all your sample applications and they work. There are two minor issues:

- Internal frame titles do not seem to change
- The window gets packed to small in TabTest in Ajax mode

But all the issues you have reported are fixed, and as long as you are running with the latest ajaxswing.js you should see it working.

subes

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #20 on: July 14, 2009, 02:59:23 AM »
ok im testing again :)

subes

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #21 on: July 14, 2009, 07:13:24 AM »
Ok, good work. My bad with the cache, sorry. ^^

Though I have two things that still need to be adressed:

I've attached new samples.

1. We need a postback when a tab is changed.
TabTest has been extended with a button on the second tab that gets disabled on the showing event.
This button should normally be directly disabled and the textfield should be filled with "zwei".
On the button click, a postback is done which also allows the showing event to be processed.
and thus the textfield gets filled and the button gets disabled.
In TabTest, the text field somehow stays empty on postback. In our framework a postback works fine. So for now this fact is not really important.
What's important is, that the postback just occurs on tab change so that the button directly gets disabled.

2. We need a postback when the active window changes in a DesktopPane.
In our framework we use a taskbar with the desktoppane to allow better navigation.
DesktopTest includes a working sample of that. It shows that the taskbar is async with the active window when run in ajaxswing.

If you maybe don't want to include these additional postbacks because of reduced server load, is there a way to use the same solution as with http://creamtec.com/forums/index.php?topic=201.0 ? That would be fine aswell.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #22 on: July 15, 2009, 12:32:12 AM »
> 1. We need a postback when a tab is changed.

Use tabbedPane.putClientProperty("ajaxswing.dynamicEventsEnabled", Boolean.TRUE) or add a change listener to the tabbed pane or the model.

> We need a postback when the active window changes in a DesktopPane.

Currently there is no support for this. You can post an enhancement request and we'll add that feature.

> If you maybe don't want to include these additional postbacks because of reduced server load, is there a way to use the same solution...

Doing more things on the client is a good idea. But the post you are mentioning actually submits to the server when the focus is lost. Depending on what actually needs to be done you can do it all the browser using JavaScript, and then add AJS_onSubmit function to your HTML element. AjaxSwing will call that function when submitting page data to the server, and then on the server you can update Swing components state to match the browser state.

That's the general idea - it's hard to recommend a more specific approach without knowing your requirements. Plus you guys need to get the license for that level of tech support :-)
 

subes

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #23 on: July 15, 2009, 05:00:18 AM »
I see, I should have retested TabTest in AjaxSwing before submitting it with the changelistener. ^^
Though now atleast you told me of the property to set so we don't actually have to add a dummy changelistener. Thanks.

I am gonna ask our purchase department again if they haven't forgotten about the license. :D

subes

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #24 on: July 15, 2009, 06:01:08 AM »
Ok, tested it. The sample works flawlessly.

But with our framework code we again have the problem that with AjaxSwing 2.5.0 the first Tab stays empty.
After a Postback via button, focuslost of a validator or tab switch to the second tab and back to the first, the first tab is filled correctly.

So with this problem we are a bit further down the road now. Though I don't have time to work on this currently. I will update the topic after I'm done with my other tasks.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #25 on: July 15, 2009, 09:00:55 AM »
If you can make the problem reproducable with your TabTest example we'll be able to fix it or suggest a workaround.

subes

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #26 on: July 17, 2009, 04:35:06 AM »
Ok, a simple edit made the effect reproducable.
I removed the invokeLater and the beginOperation/endOperation.
I don't know if this is the correct reason why this does not work in our framework.
Though on the code part where I used invokeLater and beinOperation/endOperation in the framework it did not help for 2.5.0.
I could dig a bit further into the code and find out if there is some better place to implement this, but not atm.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #27 on: July 17, 2009, 06:01:35 PM »
I have tried your updated TabTest and it seems to be working correctly. The screen comes up with the text field pre-filled for the first tab and switching updates everything correctly. Can you double check and let us know exactly what does not work.

subes

  • Full Member
  • ***
  • Posts: 154
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #28 on: July 20, 2009, 03:26:22 AM »
Ok, I just got the clue that it might be the java version. :D
And ... in fact ... it was the java version. :D
I run 1.5.0 and did not enable that version in ajaxswing. After running the enable script for it, everything worx fine. Thank you. :)

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: beginOperation and endOperation in 2.5.0 Beta
« Reply #29 on: July 20, 2009, 08:35:46 AM »
Wow, that's quite strange. Especially since starting from version 2.5 AjaxSwing is automatically running compatibility script whenever it detects that JDK version has changed. Are you using AjaxSwing/bin/startServer.bat to start the server?