3. BlueXML - SIDE SIDE Getting Started Guide
3
TABLE OF CONTENT
STEP 1 : PROJECT INITIALIZATION.............................................................................................................. 4
PROJECT CREATION.................................................................................................................................................... 4
DATA MODEL CREATION.............................................................................................................................................5
INITIALIZATION, GENERATION AND DEPLOYMENT............................................................................................................ 6
TEST AND ENJOY........................................................................................................................................................8
Create a new site...............................................................................................................................................8
Add a document.................................................................................................................................................8
Search for documents......................................................................................................................................10
Data List..........................................................................................................................................................12
BlueXML - Copyright 2011
4. STEP 1 : PROJECT INITIALIZATION
Project Creation
We want to create an application to manage invoices. At the end of this tutorial, we'll have two applications:
• Alfresco Share application
• Domain Specific Application, based on ExtJS
Follow these steps to create a new project inside SIDE:
• Launch SIDE
• Go to File/New.../Project.../SIDE
• Choose SIDE
• Click Finish. SIDE will create a project with a complete directory structure
The build directory will contain generated files and log report about the generation and deployment process.
5. BlueXML - SIDE SIDE Getting Started Guide
The src/configs will will contain configuration files that need to be directly deployed in Alfresco, such as
5alfresco-shared.properties
The src/models directory will contain models:
• application model, to configure generation and deployment options
• data model, to design data structure and storage
• form model, to design form
• portal model, to design the application
• view model, to design queries and views
• workflow model, to design processes with actors, tasks, transitions, …
The src/modules directory will contain maven projects, which may be managed through SIDE
(packaged as amp files, deployed automatically, patched to alfresco.war and share.war), ...
Data Model Creation
Let's create a Data Model for our invoice management application:
• Open your “InvoiceManagement” project
• Open your 'src/models' folder
• Right click on 'data' folder and select File / New / Other...
• Open 'SIDE' folder
• Select 'Side Data Diagram'
Illustration 1: SIDE Model Creation
We want to make a complete example, not too complicated. We'll just add 2 classes or content
types:
BlueXML - Copyright 2011 Step 1 : Project Initialization
6. BlueXML - SIDE SIDE Getting Started Guide
• Invoice, which is a true content type, with a content. This class inherits Alfresco cmcontent.
6
• Company, which is a content less type, what could be called a data list. Company is only
made of meta-data, no content at all. This class inherits Alfresco dataListItem.
Initialization, Generation and Deployment
We're going to initialize the form, view and application model directly from data model:
• Select your .dt data model
• Right-click and choose Initialize Models
Be careful to select your TOMCAT_HOME and not Alfresco home. Otherwise, you will have a
deployment error.
By clicking on Finish, various models will be created. You will finish on this screen:
BlueXML - Copyright 2011 Step 1 : Project Initialization
7. BlueXML - SIDE SIDE Getting Started Guide
7
You have now the following directory layout:
BlueXML - Copyright 2011 Step 1 : Project Initialization
8. BlueXML - SIDE SIDE Getting Started Guide
Once clicked, the generation process will be launched automatically if you chose the “Launch
8Generation” option. Otherwise, you still can launch the generation process by hand:
• Select your application model
• Right-click on it and choose SIDE/Launch Generation/InvoiceManagement
Test and enjoy
Create a new site
Go and connect on your Alfresco Share server:
• Open your browser
• Go to http://localhost:8080/share
• Create a new site, based on the InvoiceManagement template we just created:
Add a document
You are now in your Invoice Management site.
• Go to the Document library
• Create a new folder called Suppliers
• Go into it
• Click on Add a document
• Choose your document
• Select your document content type. Choose Invoice.
BlueXML - Copyright 2011 Step 1 : Project Initialization
9. BlueXML - SIDE SIDE Getting Started Guide
9
• Click on Add a file
You can see all the Invoice meta data on the screen. We'll see in step 2 how to customize view models
and select only the ones you want.
• Click on Edit metadata
All the aspects are available as tabs. The complete layout may be changed to use panels, bordered
panels, … You can express all the share-form configuration. Associations are available as browse
buttons. The associations may be changed to use drop plain down lists, checkbox list If cardinality is >
1, radio list otherwise. We'll see in Step 2 how to customize forms.
BlueXML - Copyright 2011 Step 1 : Project Initialization
10. BlueXML - SIDE SIDE Getting Started Guide
10
• Click on the document you just updated
The create form is also used in view mode.
Search for documents
Besides create forms, search forms have also been generated.
• Click on Advanced Search near the search engine icon
BlueXML - Copyright 2011 Step 1 : Project Initialization
11. BlueXML - SIDE SIDE Getting Started Guide
11
• Choose the search form you are interested in
BlueXML - Copyright 2011 Step 1 : Project Initialization
12. BlueXML - SIDE SIDE Getting Started Guide
12
Data List
Go to Invoice Management site home page
• Click on Data List
• Click on New List, choose the one you want and name it “Suppliers”
BlueXML - Copyright 2011 Step 1 : Project Initialization
13. BlueXML - SIDE SIDE Getting Started Guide
13
• An empty datagrid appears
• Click on New Item and fill in the details
• An element now appears in the datagrid
BlueXML - Copyright 2011 Step 1 : Project Initialization
14. BlueXML - SIDE SIDE Getting Started Guide
14
All the available elements are displayed by default. You will see in step 2 how to customize the fields
you want to display.
If you come back in your document library and update your invoice, you can now select the company
you just created in a drop down list.
It's time now to update your form and views to exactly suit your needs.
BlueXML - Copyright 2011 Step 1 : Project Initialization
15. BlueXML - SIDE SIDE Getting Started Guide
15
BlueXML - Copyright 2011 Step 1 : Project Initialization