struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <davelnew...@gmail.com>
Subject Re: How to reterive table row value in Struts2 action ( From JSP To Struts Action )
Date Thu, 09 Feb 2012 21:49:49 GMT
You don't need a list of the items, you need a list of IDs to delete.

You can either make the checkboxes all have the same name and create a List
setter, or use map notation and use the ID as the key. In the delete action
pass those IDs to your delete service/DAO.

Dave

On Wed, Feb 8, 2012 at 3:31 PM, Matt <csguna.slash@gmail.com> wrote:

> I am kind of new to Struts2 , please help me with the below scenario .
>
> Here is the scenario. First search action is invoked. So here is the place
> where I can have ArrayList called as the "listOfDtos" with getters and
> setters. When this search action is executed listOfDtos is populated and
> the
> search results jsp iterated through these dtos and displays it. Now the
> user
> selects couple of records and clicks a button called delete. The delete
> button is tied to a separate action called DeleteAction. So now the
> listOfDtos is not available in this DeleteAction. Even if I again have
> another listOfDtos defined in DeleteAction , how will those values be
> populated ?
>
> --
> View this message in context:
> http://struts.1045723.n5.nabble.com/How-to-reterive-table-row-value-in-Struts2-action-From-JSP-To-Struts-Action-tp5467605p5467605.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message