This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple Button  RSS feed

 
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!