title: Detect Spring Web Flow transition event id in Validator
body: <p>I use Spring Webflow 2 and I need to detect the fired transition event id in my validator.</p>
  
  <p>In my flow.xml </p>
  
  <pre><code>&lt;view-state id="stepFinal" view="/registration/consultant/registr-step-final" model="consultant"&gt;
  
      &lt;transition on="addSkill" to="stepFinal" validate="true" bind="true"/&gt;
      &lt;transition on="deleteSkill" to="stepFinal" validate="true" bind="true"/&gt;
      &lt;transition on="back"  to="stepOne"  validate="true" bind="true"/&gt;
      &lt;transition on="preview" to="stepPreview" validate="true" bind="true"/&gt;
  
  &lt;/view-state&gt;
  </code></pre>
  
  <p>My validator for "consultant" model </p>
  
  <pre><code>@Component
  public class ConsultantValidator implements Validator {
  
  public boolean supports(Class clazz) { return clazz.equals(ConsultantRegistrationModel.class); }
  
  public void validate(Object object, Errors errors) {
      ConsultantRegistrationModel consultantModel = (ConsultantRegistrationModel) object;
  
      // My validations here
      // Here I want to detect the event id which was fired.
      // For example (see in my flow.xm) 
      // I have: 
      // transition on="addSkill"
      // transition on="deleteSkill"
      // transition on="back"
      // transition on="preview"
  
  
      // I want to detect here if is it "addSkill" or "deleteSkill" or "back" or "preview"?
      // Any solutions?
  
  }
  </code></pre>
  
  <p>I hope I'm super clear in my comments in the code snippet.
  Any help would be much appreciated.</p>
  
  <p>Also</p>
  
  <p><code>RequestContextHolder.getRequestContext().getCurrentEvent()</code></p>
  
  <p>doesn't help as it returns null</p>
  
  <p>and as for </p>
  
  <pre><code>RequestContextHolder.getRequestContext().getCurrentView().getUserEventState()
  </code></pre>
  
  <p>It actually contains event id but its getter is protected so I can't obtain it.</p>