Can a button be mapped to a member variable in the ActionForm? If it's clicked, true; if not, false?
posted 9 years ago
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 ]