File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Multiple Button Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Multiple Button" Watch "Multiple Button" New topic

Multiple Button

yash Vi
Ranch Hand

Joined: Jul 17, 2005
Posts: 41
Multiple button support How should multiple button support be handled in Struts? Each button gets submitted with different text,
but in order to separate the view from the controller that text should not appear in the Action.

The situation is I have a list of Employee Names(which are typically records)displayed and each record having
a edit,Delete button.LookUpDispatch action might help to identify among the 2 buttons but
how do we identify Edit button of which employee was clicked

Thanks for your reply and time.<br />Windows 2000,j2sdk1.4.2_08
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
One possible solution would be to use a link rather than a button. The link could be something like:

<a href="">Delete</a>

You can dynamically generate the link in the jsp. You can still get the look and feel of a button by using an <img> tag with a link surrounding it.

Consultant, Sima Solutions
I agree. Here's the link:
subject: Multiple Button
Similar Threads
Passing value from jsp to action and further to another jsp
html:button Struts jsp code
identifying multiple actions from a one form
JDBC-3 Design Question
multiple submit buttons