egovconcepts / jacp

Automatically exported from code.google.com/p/jacp
0 stars 0 forks source link

save current target id before handle #3

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When target is changed outside the handle method (in an action) all information 
about original 
target get lost.
Example: 

button.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(final ActionEvent e) {

                    final IActionListener<ActionListener, ActionEvent, Object> listener = 
getActionListener();
                    setTarget("id02.editor");
                    listener.getAction().setMessage("my_message");
                    listener.getListener().actionPerformed(e);

            }
        });

The action handling currently saves the target in an local variable, handles 
the method and than 
compares old and new value. The code above leads to an state that can cause 
problems. 

If each current target would be saved in an global variable outside the 
component no 
misbehavior can occur.

Original issue reported on code.google.com by amo.a...@gmail.com on 21 May 2010 at 3:59

GoogleCodeExporter commented 9 years ago

Original comment by amo.a...@gmail.com on 12 Mar 2012 at 2:26