Friday, February 23, 2007

More Embedded Editor Fun

While playing around with embedded editors today, I came up with another cool idea. When you have an embedded view and you want to programmatically change documents, what can you do? Sure, you can put some action buttons on the embedded view, but that's kind of limited. What if, instead, you wanted to do something like in Gmail, where you can select a pulldown value to trigger some action on a document? Actions aren't going to help you too much then. Enter the embedded editor. On your form, simply add the design elements you want to use to modify the document. In the example below, I have two buttons and a select box. All of the form elements are hidden when embedded except for this line. When the embedded view is wired to the embedded editor and the user selects the document in the view, the buttons and select box appear. The code behind the elements can be as simple or complex as you want...they are just running on the selected doc. A simple yet elegant solution...

Click on the graphic for an animated version of this technique in action.

Enjoy the weekend everyone!

Labels: , ,


By Blogger Nathan, at 3:54 PM  

Wait... so you have the embedded editor ABOVE the view. When you select a document, you're actually seeing THAT document in the space above the view, and then you're triggering the buttons & select box IN THE SELECTED DOCUMENT!?

So the "Add Star" is actually a control in the form that's displayed in the target document, rather than the CONTAINER document.

Holy crap! That is f'ing AWESOME.

By Anonymous Stephanie Boissonnas, at 4:26 PM  

Holy ****! That is incredible. Thank you, thank you, thank you! I can't wait to find a way to work this into my apps!

By Anonymous Andy Broyles, at 4:25 PM  

Dude, that is simply awesome!

By Anonymous Kevin Pettitt, at 12:34 AM  

What Nathan said ;-). I think my head is going to explode now.

By Blogger Esther, at 6:01 PM  

Chris, this is beautiful, as is everything you do, but I'm going to be nitpicky here. (How, if at all) does this work on multiple documents? i.e. since you're emulating GMail, in Gmail you can select multiple docs and apply a label to all of them. I'm not all that familiar with embedded editors, since we just upgraded to R6 a few months ago, but I'm currently tearing apart your Squishee app and it doesn't seem that you'd be able to use the dropdown to apply a label (or do whatever) to multiple documents.

By Blogger Chris Blatnick, at 7:15 PM  

Thanks, Guys! I thought it was cool. :-)

@Esther...Actually, you are right...I am only partially emulating Gmail. Since it is an embedded editor, it will only work on one document at a time. You could probably do something similar that works on multiple docs, but it would be with a construct other than an embedded editor. Great question and good luck playing with these ideas...It's quite fun! :-)

By Blogger Marcos Romero, at 7:30 AM  

Chris, I just left a comment on Nathan's website thanking you both because of your great job. This new one is just amazing again.
Just another little feature: you could add/remove star by clicking on the star picture using "Editable column" + "InViewEdit" features in views. I used it recently in a multiple choice-like application. Is the same as used in Mail Rules folder to enable/disable rules.


Marcos Romero

By Blogger Chris Blatnick, at 5:48 PM  

@Marcos...Ah, this is a great idea! Then it would be even more Gmail like. Thanks for pointing this out!!!

Post a Comment

Links to this post:

Create a Link

<< Home