You're welcome!

Yup, getAllValues() includes the deleted values as well. getValues() does not.

Jamie

Filip Balas wrote:
Thanks Jamie!

Considering I will be using this "getDeletedValues"
functionality quite often, I think I will subclass the original
listeditmap. So by your response, I assume the getAllValues does include the deleted values as well (with their modified fields from the form).
Thanks for your help,
Filip


On 5/23/05, Jamie Orchard-Hays <[EMAIL PROTECTED]> wrote:

Filip:

You have two choices:

1. get the deleted keys and loop through the List returned by
getAllValues() and create a List of those deleted.

2. Subclass ListEditMap and add a getDeletedValues() method.

Personally, I'd use the second method.

One thing to notice is that ListEditMap is just a plain class. It's not
a sublcass nor does it implement an interface. It's just a convenient
way of dealing with ListEdit. I've created my own similar classes for
specific situation by using ListEditMap as an example. Just last week I
needed to handle something rather complex regarding grades in my app at
work, so I created a class called "GradesListEditMap". It's similar to
ListEditMap, but different enough that I didn't sublcass it.

You might consider whether what you need for your situation is a custom
ListEditMap.

Filip Balas wrote:

In the ListEditMap you can retrieve the
deletedKeys, is there any way to retrieve
the deletedValues?

I'm not sure if this is the right way to go
about what I am trying to do so I will describe
it below:

When 2 users are using my form, userA is
editing some fields on record_foo meanwhile
userB removes that record before userA
has a chance to submit.  Later userA submits
and I would like the following to occur:
I want the application to realise the object was
removed from the database, then to recreate
a new copy of it and initialize it with the changes
userA made.

In essence I DO NOT want to loose the changes
userA made because they take a long time to
input.  I would prefer to create a new copy of the
old object and display a warning informing them
that someone else tried to delete this object.

Thanks,
Filip

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to