/** Stores a unique token in the session to prevent repeated submission of the same form. */
  @Override
  public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
    long timer = System.nanoTime();
    long random = (long) (Math.random() * Integer.MAX_VALUE);
    long token = timer ^ random;
    NGSecureUtilities.setSecurityToken(String.valueOf(token), component.getClientId());
    super.encodeBegin(context, component);

    NGSecurityFilter filter = findAndVerifySecurityFilter(context, component);
    showLegalDisclaimer(context, filter);
  }
  /** This method analyzes user input to prevent security breaches. */
  @Override
  public void decode(FacesContext context, UIComponent component) {

    super.decode(context, component);
  }