File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can button be mapped to member variable?

 
Samuel Lugo
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Can a button be mapped to a member variable in the ActionForm? If it's clicked, true; if not, false?

Thanks,
lugos
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can a button be mapped to a member variable in the ActionForm?

Yes, it can.
If it's clicked, true; if not, false?

No, that's not how it works. If you specify the following button:

<hml:submit property="saveButton" value="Save" />

If this button is pressed, when struts populates the Actionform bean, the saveButton property will be populated with whatever is in the value attribute, which in this case is "Save". If this button was not pressed, but some other button was pressed to perform the submit, the saveButton property will be null (or whatever its initial value is set to).
[ August 10, 2006: Message edited by: Merrill Higginson ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic