| Author |
delete checked checkboxes and display unchecked checkboxes
|
rahulj rjagtap
Ranch Hand
Joined: Oct 20, 2010
Posts: 39
|
|
I have a table with about 20rows, which contain a checkbox and a bit of text each. What I'm trying to find a way to do is to have delete button at the bottom of the page.When i clicked on DELETE button, it should delete records of checked checkbox rows. I need to delete all the table rows which contain CHECKED textboxes.and remaining checkboxes should be displayed. And we should keep remaining checkboxes in ARRAYLIST.
I want to delete checked checkboxes.And store all unchecked checkboxes in Arraylist(collection). and print that arraylist.
I've been able to get bits of it to work at various times, but I'm running out of time and I really need help. Any suggestions anyone has would be more than appreciated!
Thanks!
|
 |
Rajkishore Pujari
Ranch Hand
Joined: Sep 03, 2005
Posts: 46
|
|
|
Are you planning to make a server call when you click on delete? You can actually disable and hide them using Javascript when you click on delete and when you save the form, the disabled (which are also hidden in this case) checkbox values will not be sent to server and you will have only uncheked checkboxes.
|
 |
Sai Hegde
security forum advocate
Ranch Hand
Joined: Oct 26, 2010
Posts: 183
|
|
Well, delete could be a hard delete with the delete persisting to your database.
Assign values to the checkboxes while you are populating the table at the first instance. As for the rest, I think you could figure it out.
|
 |
rahulj rjagtap
Ranch Hand
Joined: Oct 20, 2010
Posts: 39
|
|
Thanks for your valuable reply...
But I have a arraylist of records. From that arraylist , if i want to delete some records of table ,then using checkboxes,after checking some of checkboxes, i want to delete selected (checked)checkboxes.And remaining checkboxes should be retained in that arraylist. So, previous arraylist is replace by new arraylist with same name.
Please, can you give me some code.Actually i tried hard to get it.But i am going out of time.So, please help me.
Thanks in advance !!!
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56233
|
|
rahulj rjagtap wrote:Please, can you give me some code.Actually i tried hard to get it.But i am going out of time.So, please help me.
Please read this: NotACodeMill
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
rahulj rjagtap
Ranch Hand
Joined: Oct 20, 2010
Posts: 39
|
|
Please, I tried this code. BUt i am getting problem in storing deleted checkboxes in arrylist. And that arraylist should be displayed below Remove button in java.
|
 |
 |
|
|
subject: delete checked checkboxes and display unchecked checkboxes
|
|
|