• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple Button

 
yash Vi
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic