aspose file tools*
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Multiple Button" Watch "Multiple Button" New topic
Author

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="deleteEmployee.do?empnum=12345">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.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple Button