Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can button be mapped to member variable?

 
Samuel Lugo
Greenhorn
Posts: 24
  • 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
  • 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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic