Hi Stefan, Which version of ULC are you using?
The issue has been fixed in ULC 6.1: https://www.canoo.com/jira/browse/UBA-644. ULC guarantees the order of events. Try the following snippet in ULC 6.0.4 in DevelopmentRunner with -useGui option. You can then see the order of requests by selecting the "Dump Requests" options. Thanks and regards, Janak -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Stefan Thomas Sent: Tuesday, August 15, 2006 3:38 AM To: [EMAIL PROTECTED] Subject: [ULC-developer] Setting event delivery to asynchronous mode for recovering from lost clicks Hello, there have been several discussions about loosing click events in case the user is editing some text input field with focus listener or an updateable table cell. The advice to use asynchronous event delivery modes was always accompanied by the warning that this might result in undesirable effects because the target element for the click (e.g. the submit button of a form) might be disabled by the focus lost or table update event. I am now wondering if thisis the only complication. Is it possible that the secondary (asynchronous) click event on the submit button overtakes the update in the input field or table cell and that the submitted form is then not evaluated correctly? In other words, is it guaranteed that the secondary event is processed on the server side after the first event has been processed on the server side completely - i.e. the client does not block - but the server still does. Cheers Stefan ----------------------------------------------------- import com.ulcjava.base.application.AbstractAction; import com.ulcjava.base.application.AbstractApplication; import com.ulcjava.base.application.ClientContext; import com.ulcjava.base.application.IAction; import com.ulcjava.base.application.ULCBoxPane; import com.ulcjava.base.application.ULCButton; import com.ulcjava.base.application.ULCFrame; import com.ulcjava.base.application.ULCTextField; import com.ulcjava.base.application.event.ActionEvent; import com.ulcjava.base.application.event.FocusEvent; import com.ulcjava.base.application.event.IFocusListener; import com.ulcjava.base.development.DevelopmentRunner; import com.ulcjava.base.shared.IUlcEventConstants; public class LostEventSnippetSnippet extends AbstractApplication { public void start() { final ULCTextField textField = new ULCTextField(20); ClientContext.setEventDeliveryMode(textField, IUlcEventConstants.FOCUS_EVENT, IUlcEventConstants.ASYNCHRONOUS_MODE); textField.addFocusListener(new IFocusListener() { public void focusGained(FocusEvent event) { } public void focusLost(FocusEvent event) { System.out.println("Focus Lost"); textField.setText("DEF"); } }); ULCBoxPane content = new ULCBoxPane(1, 0); content.add(textField); content.add(new ULCButton(new ValueAction(textField))); ULCFrame frame = new ULCFrame("LostEventSnippetSnippet"); frame.setDefaultCloseOperation(ULCFrame.TERMINATE_ON_CLOSE); frame.add(content); frame.setVisible(true); } private static class ValueAction extends AbstractAction { private ULCTextField fTextField; public ValueAction(ULCTextField textField) { fTextField = textField; putValue(IAction.NAME, "Show Value"); } public void actionPerformed(ActionEvent event) { System.out.println("Button Action Performed"); fTextField.setText("ABC"); } } public static void main(String[] args) { DevelopmentRunner.setApplicationClass(LostEventSnippetSnippet.class) ; DevelopmentRunner.main(args); } } _______________________________________________ ULC-developer mailing list [email protected] http://lists.canoo.com/mailman/listinfo/ulc-developer
