Extension Point: Surf Extension Modules
Description:
This tutorial demonstrates how to add a new menu item called Create an Acme Text Document to the Create… menu that is available in the browse view in the Document Library. When the new menu item is selected it will prompt the user for document name, title, description, and text content. When the user clicks Create to create the document it will be created with a custom type set. Because the document is created with a custom type we also need to configure a “create” form for this type, which this tutorial shows how to do. The general take away from this tutorial is that most of the configuration that is normally done in the share-config-custom.xml file can also be done with Surf Extension Modules, which makes it possible to enable and disable the configuration at runtime.
Implementation Steps:
Adding a new content create item in the Document Library usually involves the following steps:
- Create a custom content model, with the type that should be set on content when using the new create content action.
- Generate/Use a Repo JAR project to contain the custom model
- Create a Surf Extension Module containing the create action definition and the form definition.
- Generate/Use a new Share JAR project to contain the Surf Extension Module
Related Information:
This tutorial assumes that you are familiar with the Document Library in Share.
Source Code: Go to code
This tutorial assumes you have created a new SDK All-In-One project.
Sometimes when you have a custom content model it is useful to be able to create new documents with a custom type set automatically, and at the same time also collect values for the type’s custom properties. All directly from the Share user interface. This can be done by adding menu items to the Create… menu in the Document Library.
Tutorial implementation steps: