I was [virtually] beaten up for updating domain model in GET request
;) And I agree, this is not a good practice. I personally tolerate
deleting an item from a table using link, because having table with
links saying "Delete" is nicer, than having table with bunch of
buttons. But in this particular situation, I say use FORM and use
button, and use POST.
Too bad that links do not have "method" attribute. And why not to use FORM?
Michael.
On 4/20/05, Fogleson, Allen <[EMAIL PROTECTED]> wrote:
> Ahh now I understand better.
>
> Well unfortunately the easiest way to get the checkboxes submitted is to
> have them inside of a form. That doesn't necessarily mean an <html:form>
> but they must be in a form of some type to get them submitted.
>
> Now with that said I am going to say there is a way to do it without
> submitting the "form" itself if you are willing to muck about with
> javascript.
>
> In your link you could have an onClick event which runs a js script that
> finds all the checked boxes and creates a url based on those something
> like
>
> XXXX/deleteThings.do?blah=a&blah=b etc.
>
> Then have the javascript go to the created url (window.location etc). In
> your action you would just use a request.getParameterValues("blah") and
> you would end up with an array of ids to delete.
>
> HTH,
> Al
>
> -----Original Message-----
> From: Rafael Taboada [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 20, 2005 12:55 PM
> Cc: Struts Users Mailing List
> Subject: Re: Using checkbox to delete items
>
> yeap but. does it haes to be inside to html:form? Because i have a
> button(image) which has the link to call the delete action.
>
> in the action class, do i have to call the array of user ids with
> getParameter?
>
> i'm confused in what to do in action class.
>
> --
>
> Rafael Taboada
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]