Friday 28 September 2007

In-line Document Authoring

With the properties dialog working (to an extent), I looked at building a component for creating rich text documents within the app. The latest GWT version has a rich text editor control which fit the bill nicely. Now we have a great little tool for getting rich text content authored and into the docbase quickly - similary in some ways to web publisher's editor.

From the DFS side of things, again the coding was straightforward. Content transfer makes things a little more involved, as I had to decide which Content implementation to use to submit the rich text to the Object Service. The GWT allows us to retrieve the entered rich text on the web-app side, as a String containing the rich text in HTML format. This String can then be passed directly to the Object Service - using the BinaryContent implementation (after the String is converted to a byte[] array). I also decided to set the content transfer type to Base64, although an enhancement might be to switch to MTOM if the entered text is really large...

Still, a working rich text document creation tool - built in 2 hours!

No comments: