Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

Delete Confirmation in Struts2

hisameer

2008-08-02

Replies: Find Java Web Hosting

Author LoginPost Reply

Hi

I am having a problem in getting the confirmation of a delete operation. My
requirement is that:
I have a list of user and I have a DELETE link for each and evey user in
the list. I already defined a delete action mapping for the user but before
deleting the user I want to get confirmation from the admin whether he
wants to delete that user or not and then I want to call the delete action
mapping my code is like that:

In the userList.jsp:


<s:url id="deleteUrl" action="deleteUser" namespace="user">
     <s:param name="user.userID" value="userID" />
   </s:url>

<s:a href="%{deleteUrl}">
       <s:text name="Delete" />
</s:a>

My action Mapping is:

<action name="deleteUser" class="com.support.struts.action.UserAction"
     method="deleteUser">
     <result>/userList.jsp</result>
   </action>


If you need any further info Please do let me know.

Please advice me how should I handle the user confirmation. If possible
please attach a sample code for it.
--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.