Argh! Embedded Editors?

Hi all,

Can someone tell me what embedded editors are and how i use them??

Im having a problem getting one of my action buttons to work (change the status) on my embedded views and ive been told to look at editors?

All my other action buttons appear to work fine just not the one where i need to change the status!!

Any help I’d really appreciate.

Thanks,

gem

Subject: Argh! Embedded Editors?

Check out InterfaceMatters.com or Escape Velocity for some great examples of how to use embedded views and editors. Chris provides numerous links to other blogs that demo other variations.

I love/hate these things. In an app I’m doing, I have a form with a two row table - top row = embedded editor, displays only actions, and the lower row is an embedded view. Click a doc, hit an action, doc updates.

BUT…

I need the doc in edit mode because I have some QuerySave code that generates an audit trail. If I do something like:

@Command([EditDocument];“1”);

@SetField(“abc”;“MyValue”);

@PostedCommand([FileSave]);

@PostedCommand([EditDocument];“0”);

Magic…

If I do:

@Command([EditDocument];“1”);

tmp := @Prompt([okcanceledit];“Enter value”;“What value do you want?”;“”);

@SetField(“abc”;tmp);

@PostedCommand([FileSave]);

@PostedCommand([EditDocument];“0”);

NO magic. The Prompt pulls focus away from the selected document and NOTHING gets updated. That only took about a week to figure out.

I’ve also run into numerous problems with order of execution and how it ties to document locking (or not) when you want to execute several actions in sequence in the front end (again because of the audit trail requirement). I had to make each field update a separate ‘edit-on, update, save, edit-off’ events so the document didn’t step on itself.

HTH and hang in - these things really are pretty cool.

Doug

Subject: Argh! Embedded Editors?

An embedded editor is essentially a form that allows you to update a document selected in a view that is also embedded on the same form/page. Very useful if you have more than one field to update, or if the value to be added/changed is not a standard value (like, say, a status value that can have only one of a limited number of possible values). I can’t think of a reason why you’d want to use one to do something like a simple status change – an action is definitely the way to go.

Would you mind posting the code, and describing the situation (where the view is embedded, where the action lives, and so on) in as great detail as you can? There’s no reason this shouldn’t be workable.