I am trying to put 2 submit buttons in same form and they both calls different actions from struts.xml
My problem is I want to put that buttons in same row. but, I am not able to do that.
my code is
I tried many ways to put in same row but as such they both belongs to different actions, I am not able to put in same row.
Let me know if any of you have idea to accomplish it
Use simple theme with both forms, that way Struts won't generate any tables so you can have both buttons in the same row. More info on themes can be found here...
first of all let me tell you about this form. This form fetches agency information from database and we can edit information from here and also it shows users of this agency through another submit button.
Here I tried to use simple theme but still it gives me button at different rows.
Yes, I tried the simple theme as was originally suggested back on August 10...I wouldn't have responded to this thread otherwise. The issue is that when adding 'theme="simple"' to the form tag, tables are no longer generated but that still won't bring the buttons into the same row.
chris locke wrote:The issue is that when adding 'theme="simple"' to the form tag, tables are no longer generated but that still won't bring the buttons into the same row.
Main question is usign two buttons in a form, which are supposed to call different actions.
For this using two different forms are NOT an solution.
use one form with theme as 'simple' and keep two buttons inside the same form and use the action attribute of those buttons to call respective actions.
Hmm.. Okay, I found another example on google which supported the original code (2 forms) with a simple theme, but it had as an addendum that you must manipulate the css stylesheet to incorporate the generated ID and add the line "display: inline;"
I tried it out and found that it works, but I like your way better. Thank you