This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:submit Vs html:cancel buttons

 
Charanjit Sidhu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am new to Struts and am in the process of developing a new application in struts.
I read that the only difference between html:submit Vs html:cancel is that the later does not invoke the validate() method in the ActionForm associated with the page. But how can we know in the Action bean which was clicked (Submit or Cancel button)?

Also I want to know what is a good resource to learn the Struts taglibs.

Thanks
Charanjit
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Charanjit,
The action class provides and isCancelled() method you can call.

The developer guides from Struts are a good resource to understand each of the html tags.
 
Charanjit Sidhu
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne,

Thanks so much for the 'Quick & To the point answers'.
This is my first question on this forum and am exited with the response!!!

Charanjit
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic