I have often felt that we needed a more real-life/complex sample application to adequately demonstrate LiveCycle Data Services, and specifically the Data Management Service. So, I wrote a new version of Salesbuilder that uses LCDS to persist data at the server side. “Salesbuilder LCDS” demonstrates advanced LCDS features such as associations, lazy loading, etc.
This application will also be packaged as a sample in the next version of LiveCycle Data Services currently in private beta.
Here is a quick look at the destinations and associations used in the application:
<adapter ref="java-dao" />
<properties>
<source>com.salesbuilder.assembler.AccountAssembler</source>
<scope>application</scope>
<metadata>
<identity property="accountId" undefined-value="0"/>
<many-to-one property="salesRep" destination="sales-rep" lazy="true"/>
<many-to-one property="industry" destination="industry" lazy="true"/>
<many-to-one property="category" destination="account-category" lazy="true"/>
<many-to-one property="state" destination="state" lazy="true"/>
</metadata>
</properties>
</destination>
<destination id="contact">
<adapter ref="java-dao" />
<properties>
<source>com.salesbuilder.assembler.ContactAssembler</source>
<scope>application</scope>
<metadata>
<identity property="contactId" undefined-value="0"/>
<many-to-one property="account" destination="account" lazy="true"/>
<many-to-one property="manager" destination="contact" lazy="true"/>
<many-to-one property="salesRep" destination="sales-rep" lazy="true"/>
</metadata>
</properties>
</destination>
<destination id="opportunity">
<adapter ref="java-dao" />
<properties>
<source>com.salesbuilder.assembler.OpportunityAssembler</source>
<scope>application</scope>
<metadata>
<identity property="opportunityId" undefined-value="0"/>
<many-to-one property="account" destination="account" lazy="true"/>
<many-to-one property="salesRep" destination="sales-rep" lazy="true"/>
</metadata>
</properties>
</destination>
<destination id="industry">
<adapter ref="java-dao" />
<properties>
<source>com.salesbuilder.assembler.IndustryAssembler</source>
<scope>application</scope>
<metadata>
<identity property="industryId" undefined-value="0"/>
</metadata>
</properties>
</destination>
<destination id="sales-rep">
<adapter ref="java-dao" />
<properties>
<source>com.salesbuilder.assembler.SalesRepAssembler</source>
<scope>application</scope>
<metadata>
<identity property="salesRepId" undefined-value="0"/>
</metadata>
</properties>
</destination>
<destination id="account-category">
<adapter ref="java-dao" />
<properties>
<source>com.salesbuilder.assembler.AccountCategoryAssembler</source>
<scope>application</scope>
<metadata>
<identity property="categoryId" undefined-value="0"/>
</metadata>
</properties>
</destination>
<destination id="state">
<adapter ref="java-dao" />
<properties>
<source>com.salesbuilder.assembler.StateAssembler</source>
<scope>application</scope>
<metadata>
<identity property="stateId"/>
</metadata>
</properties>
</destination>
Installation instructions:
Prerequisite: You need to have LiveCycle Data Services installed on your system before executing the steps below.
- Download salesbuilderlcds.zip
- Unzip salesbuilderlcds.zip in /salesbuilderlcds
- Copy the content /salesbuilderlcds/webapp/WEB-INF/classes to the WEB-INF/classes directory of your web application
- Add the destinations defined in /salesbuilderlcds/webapp/WEB-INF/flex/data-management-config.xml to the data-management-config.xml file of your web application
- Start the salesbuilder database
- Open a command prompt and go to /salesbuilderlcds/db
- Run startdb.bat (Windows) or startdb.sh (Unix-based systems)
- Start your application server
- Double-click /salesbuilderlcds/salesbuilderlcds.air to install the air application
- Run the application
Configuration Note:
By default, the application tries to connect to the localhost server using the RTMP protocol on port 2037. If your server configuration is different, edit config.xml in the salesbuilder installation directory (”Program Files\Salesbuilder LCDS” on Windows).
If you are not familiar with the Salesbuilder application, here is a quick walkthrough:
Sales Pipeline
The sales pipeline features many “direct manipulation” options:
- Grab the background of the chart with your mouse and scroll it left and write to navigate along the time axis.
- Grab a vertical grid line, and move it left and right to zoom-out/zoom-in.
- To modify your pipeline directly, grab a bubble with your mouse and move it up and down or left and right to adjust the probability and the expected closing date respectively. The projected revenue is automatically updated in the chart title. When you release the mouse button, the opportunity is automatically updated (probability and close date) in the database.
- You can also double click a bubble to open a details view for the opportunity.
Search and Summary Screens
- Type a few letters in the search box (upper right corner): matching accounts, contacts, and opportunities appear.
- Use the arrow keys to navigate in the search results popup.
- Use the Enter key to open the selected item.
- Alternatively, you can also open the summary screens (”Accounts”, “Contacts”, and “Opportunities” buttons in the menu bar), and open individual items from there.
Working with Data
- Open the “Alpha Corp” account.
- Make some changes to the Alpha Corp data (for example, change the phone number), and click “Save””.
- In the Contacts view of the Alpha Corp tab, you can grab an org chart item with your mouse and move the org chart around.
- To open the details view for a contact, either double-click an org chart item or click the Grid button (lower left corner) and double-click a contact in the datagrid.
- Add a contact by clicking “Quick Contact”. Make sure you select a manager, click save and notice that the org chart is updated automatically.
- Continue to add and modify accounts, contacts, and opportunities. The data is persisted using the Data Management Service.
Native drag-and-drop
- Click the “Opportunities” menu button.
- Drag the dashboard title on the desktop: the chart is saved as a JPG on the desktop. Note: it can take a few seconds before you actually see the drag icon.
- Open a Word document, drag the dashboard title again, and, this time, drop it directly in the Word document.
- Select some rows in the datagrid, and, without releasing the mouse button, drag the selected rows and drop them on the desktop. The rows are saved as an Excel document on the desktop.
- Double-click the Excel document to open the spreadsheet.
- Drag some rows from the Datagrid again, and, this time, drop them directly somewhere in the Excel spreadsheet.
有任何问题请留言...
作者:gdgzboy@牛C网
地址:http://www.niuc.net/post/249/
版权所有。转载时必须以链接形式注明作者和原始出处及本声明!
Salesbuilder for AIR 1.0
提供一个FLEX锐化(SharpenFilter)类
Aswing 是好东西
QuickTv Beat 1 (FLEX 播放器)
edushi 地图FLEX应用
SQLQueue: Chaining Asynchronous SQL statements using the AIR database access API
BlazeDS Release Candidate Available
Building Collaborative Applications with Flex Data Services and Flash Media Server
恐龙 PaperVision3D = ?
在Flex中使用资源包
用Air 制作的SQLite Admin第三次更新
Flex SQLite Admin的BUG





