You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by ma...@apache.org on 2004/01/28 02:56:05 UTC

cvs commit: jakarta-velocity-tools/examples/struts/examples/struts_app5 validator-demo.vm

marino      2004/01/27 17:56:05

  Added:       examples/struts/examples/struts_app5 validator-demo.vm
  Log:
  a new example app to show off the ValidatorTool for Struts 1.1
  
  Revision  Changes    Path
  1.1                  jakarta-velocity-tools/examples/struts/examples/struts_app5/validator-demo.vm
  
  Index: validator-demo.vm
  ===================================================================
  <html>
      <head>
  	    <title>Struts App5: Struts ValidatorTool Demo</title>
  	    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      </head>
  
      <body>
          <h2>Struts App5: Struts ValidatorTool Demo</h2>
          <p>A demonstration of the Velocity ValidatorTool provided for Struts support.</p>
  
  	#errorMarkup()
  
          <form name="emailForm" action='$link.setAction("do_submit")' method="post" onsubmit="return validateEmailForm(this)">
              <input type="text" name="email" value="$!emailForm.email"/>&nbsp;
              <input type="submit" name="submit"/>
  	</form>
  
      </body>
      ## if this line is commented out, the form will be validated server-side ... go ahead, try it :)
      $validator.getJavascript("emailForm")
  </html>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org