title: Audit trail for JSF application - Global valueChangeListener possible?
body: <p>I am trying to implement an audit trail functionality for my web application that records:</p>
  
  <ul>
  <li>lastModified (timestamp)</li>
  <li>modifiedBy (user information)</li>
  <li>userComment (reason for value change)</li>
  </ul>
  
  <p>for each of my input fields (input fields are spread over several forms with different backing beans and different valueHolder classes).</p>
  
  <p>The first two (lastModified and modifiedBy) are easily done with the help of an JPA AuditListener and @PrePersit and @PreUpdate methods.</p>
  
  <p>The third one is a bit tricky since it requires user interaction. Best would be a dialog that asks for the user comment.</p>
  
  <p>So there are (at least) two open issues: Can I establish a "global" valueChangeListener for all input fields in my application? Is this possible without attaching <code>&lt;f:valueChangeListener&gt;</code> to each single input component? Second: How can I grab the user comment. My idea is to put a <code>p:dialog</code> in my web page template but this dialog needs to know from which input component it is called.</p>