Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Chapter 5: Building a sample application... > Saving tasks to the database - Pg. 151

</plugin> 2. Modify the MyComposite class to add an action bar, as shown in Example 5-11. Example 5-11 MyCompostite class class MyComposite { private void initialize() { setLayout(new GridLayout(1,false)); mActionBar = WidgetFactory.createActionBar(this, SWT.RIGHT | SWT.FLAT); table = new Table(this, SWT.SINGLE | SWT.FULL_SELECTION | SWT.CHECK |SWT.BORDER); createColumns(); //... makeActions(); contributeToRealActionBars(); } private void contributeToRealActionBars(){ mActionBar.add(mActNew); mActionBar.add(mActDel); } private void makeActions() { mActNew = new ActionTaskNew(); mActDel = new ActionTaskDel(); } } Similarly, we can create another action bar in the Detail View and add the Save command. 5.8 Saving tasks to the database IBM Workplace Managed Client supports creating, accessing, and migrating database data to and from the client. Workplace Managed Client supports the use of any JDBCTM-compliant database. Workplace Managed Client comes with an embedded IBM Cloudscape database, currently at Version 10. Although it is not obligatory for Workplace Managed Client applications to use the IBM Cloudscape database, it is well worth considering because it provides a number of advantages, including: Pure Java relational database No administration on the client system required Chapter 5. Building a sample application for the IBM Workplace Managed Client platform 151