Link to home
Start Free TrialLog in
Avatar of mrigank
mrigank

asked on

Delete fields from a form

Hi,
I have a page in which there is a listing of items. To delete any item from the list I have to click on a link associated with that item.

But otherwise there is a lot of data which is transient both common to all the items and unique to each of them.

On deleting an item only that data should be removed which is unique to that item and i should see that page again. I dont know how to do it without submitting the form. Sessionattributes seem to be an idea but since the page has a lot of data it is better if that is avoided.

Thanks
Mrigank
Avatar of Karaa
Karaa

>>But otherwise there is a lot of data which is transient both common to all the items and unique to each of them.On deleting an item only that data should be removed which is unique to that item and i should see that page again.

please explain a little what do u want to do?
Avatar of mrigank

ASKER

Let me simplify things....

After deleting the item I should come back to the same page. The page contains other data as well. As i come back to that page, those data which are in text boxes, drop downs etc etc are to be prepopulated with the old values which i had selected.

How do i do that
Do u want to remove data (item)from database as well or just from the list
if yes "remove from db" then u have to submit
if no then by javascript it is very easy
Avatar of mrigank

ASKER

I have to remove data just from the list. There are other data which belong to the selected item and they are also to be removed.

SOLUTION
Avatar of Karaa
Karaa

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mrigank

ASKER

The page is something like this:

Item                Value                  Delete?
abc                  xyz                     delete(link)
123                  rst                      delete(link)

data         data             data              data      (which should remain after deleting one item)


(another table)
Item                  Value          
abc                    val1
123                    val2

I have to remove the data from thi stable to..... and continue to retain the "data" value... what i had decided was that I will make another url with the deleted item object removed... but in that case the "data" would be lost.... then i was thinking of submitting the form and redirect to this page only... again with that item removed.....

may be i was thinking of a complecated procedure.... someone suggested that i use session attributes to persist the "data" but i am not sure how good would it be in a page which contains lots of "data"

Regards
this data will remain even if u r deleting items from list by javascript as i have mentioned
Avatar of mrigank

ASKER

I think i havent made myself clear....
The above two item - value pairs are in table form... the values which we get from their beans....

thus i dont think java script will work here

regards
post your code, i can get your problem very well
u were saying that u don't want to submit, then u have to use javascript else u have to do submit
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial