From: SourceForge.net <no...@so...> - 2012-12-25 18:26:12
|
Bugs item #3472415, was opened at 2012-01-11 06:19 Message generated for change (Comment added) made by mcarminati You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=879332&aid=3472415&group_id=176962 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: UI Swing Group: Core Status: Open Resolution: None Priority: 5 Private: No Submitted By: Matteo Carminati (mcarminati) Assigned to: Nobody/Anonymous (nobody) Summary: APanel statechange bug Initial Comment: Adempiere Java Swing user interface, there's a bug when user edit a field and moves to another tab without leaving editor control. The editor control doesn't fire the lost focus event, this cause that the toolbar enables the buttons Undo and Save, as if a change is made by the user, but Save and Undo does't work as the system is in a bad state. I solved the bug by execute the lostfocus before the statechange event (statechange is fired when the user change the tab) Here the piece of code that I added to APanel.Java source method stateChange to solve the problem: /************************************************************************** * Change Listener - (tab change) <-> * @param e event */ public void stateChanged (ChangeEvent e) { //......MAT0::Begin //Run LostFocus Event when change tab if (m_curWinTab != null) { Component cp = m_window.getFocusOwner(); if (cp != null){ m_window.dispatchEvent(new FocusEvent(cp, FocusEvent.FOCUS_LOST)); } } //......MAT10::End ---------------------------------------------------------------------- >Comment By: Matteo Carminati (mcarminati) Date: 2012-12-25 10:26 Message: To simulate the error execute the follow steps: 1) Open a window e.g.: Table & Column 2) Select a record and open the Tab Colum 3) Select a Column ad write something into the field description 4) without leave the field 'Description' select another tab You notice that in the toolbar the Undo button and the Save Button are activated, but if you click them nothing appens ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=879332&aid=3472415&group_id=176962 |