hi,
I created a action tracer to log all action invoked by user. but i found that the action of tree node is not logged.
Why and how to do it?
Thanks in advance.
liuliu
here is my code :
public class ActionTracer implements ActionListener {
private static final Log log= LogFactory.getLog(ActionTracer.class);
private ActionListener delegate;
public ActionTracer(ActionListener delegate) {
this.delegate = delegate;
}
public void processAction(ActionEvent actionEvent) throws AbortProcessingException {
if (log.isInfoEnabled()) {
String infosys = "User : "+"" + " Patient: "+""+" Dossier :"+"";
ActionSource2 actionSource = (ActionSource2) actionEvent.getComponent();
if(actionSource.getActionExpression() == null){
log.info(infosys +" No action is called this time : " + actionSource.toString() + ".");
}else{
log.info(infosys + " Processing the action '" + actionSource.getActionExpression().getExpressionString() + "'.");
}
}
delegate.processAction(actionEvent);
}
}