Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Struts Struts + HTML:Button not workin
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


chandramouli
Struts + HTML:Button not workin
1 Answer(s)      4 years and 10 months ago
Posted in : Struts


Hi,

I am new to struts. So pls bare with me if my question is fundamental.
I am trying to add 2 Submit buttons in same JSP page.
As a start, i want to display a message when my actionclass is called.

JSP code
--------
<td><html:submit property="button_clicked">
<bean:message key="button.add"/></html:submit>
</td>
<td><html:submit property="button_clicked">
<bean:message key="button.delete"/></html:submit>
</td>

Actionclass
-----------
System.out.println(searchForm.get_button_Clicked());
The above statement displays "null";


I have defined button_clicked in bean class.
I thought when i click ADD button, button_clicked will be set to key of
"button.add" and i can check accordingly in action class.
But it displays null. Please let me know what needs to be corrected.
OR Should i use 2 HTML TAG BUTTON's here instead of 2 HTML TAG SUBMIT's?

Advertisement
View Answers

March 11, 2010 at 10:28 AM




Related Tutorials/Questions & Answers:
 

 

 

DMCA.com