Hello,

I've read what Yalim wrote here and I've implemented that optimistic locking mechanism, and it works! However, in the meantime Formspider gone stateful and we're happy with that, but can we use this statefulness to implement a pesimistic locking mechanism?

Thank you,

Cezar

asked 03 Jun '16, 07:37

brg's gravatar image

brg
1114
accept rate: 0%

edited 03 Jun '16, 07:38


Hi Cezar,

Now that Formspider has stateful sessions, it is technically possible for us to implement pessimistic locking as a built-in feature of Formspider but it is not available yet.

I think you can also implement this yourself by coding it yourself, right? I mean locking a record when it is selected on the screen should be possible to code in Formspider via a selection changed event in grid..I think.

Kind Regards,
Yalim

link

answered 06 Jun '16, 11:22

Yalim's gravatar image

Yalim ♦♦
2.8k5
accept rate: 22%

Hi Yalim,

Of course I can "select ... for update" the record as soon as it is selected but this is "too much pesimistic" :)). I would like to lock the row at the moment the user typed something and changed its content, that is, modified a bit of information in record. This is the moment(event) I would like to trap. Do we have this kind of event exposed?

thank you,

Cezar

link

answered 07 Jun '16, 02:51

brg's gravatar image

brg
1114
accept rate: 0%

edited 07 Jun '16, 02:52

^ Hmm, but that might be a problem, right? Since the user might start modifying something, and than goes away for lunch or...One would need a timer, otherwise an message with who locked the record for the user whos accessing it after (and than call the user on the phone to commit or undo:) Or no?

link

answered 10 Jun '16, 00:23

downunder's gravatar image

downunder
612
accept rate: 0%

NO! In optimistic locking, the user is allowed to modify 10 or 20 fields in a record and when he want to commit his changes a message is popped up saying that the record was modified by another user.

In pessimistic locking, once the user starts modifying the record, he is presented with a message that informs the user the record he is modifying was locked by another user, and no further modifications are allowed.

This is the case I questioned the formspider team about. Hope they will give us some hints ...

link

answered 10 Jun '16, 03:01

brg's gravatar image

brg
1114
accept rate: 0%

Hi Cezar,

There are key events on panels, maybe that might be useful. It is worth to give it a try at least.

Kind Regards,
Yalim

(10 Jun '16, 09:16) Yalim ♦♦

Thank you Yalim!

This is the last resort I think about. I hope that our users will accept optimistic locking for the time being...

Another "would be nice to have" feature is a kind of Copy/Paste mechanism at record level implemented in datasource object. There are situations when we have to enter many records, and just one or two fields differ from record to record. So the natural flow would be: enter first record, save it, COPY it, PASTE it(trigger an event, so we could generate PK), modify two fields (this would be second record), save it, PASTE, modify, and so on ...

Thank you again and excuse my off topic!

Cezar

link

answered 13 Jun '16, 04:21

brg's gravatar image

brg
1114
accept rate: 0%

edited 13 Jun '16, 06:21

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×2

Asked: 03 Jun '16, 07:37

Seen: 3,307 times

Last updated: 13 Jun '16, 06:21


© Copyright Gerger 2017