wpf advanced wpf lab - ibm€¦  · web viewthe other entries did not have a, b, c indicators, but...

56
© Copyright IBM Corporation 2022 All rights reserved IBM WEBSPHERE EVERYPLACE DEPLOYMENT ORKPLACE CLIENT TECHNOLOGY DEVELOP DEVELOPER ER WORKSHOP – LAB EXERCISE WebSphere Everyplace Deployment orkplace Client Workshop W CT Smart Client Rich Application Development Lab What this exercise is about The objective of this lab is to take you through the steps necessary to develop a Smart Client Rich application that will run within the IBM WebSphere Everyplace Deployment (WED) Client v6.0 orkplace Client Technology . WED CT is based on the Eclipse Rich Client Platform so most of the steps are very similar. This lab will highlight the key extension points for WED CT . This lab will also take you through the steps to package you application as a feature that can be installed through the WED CT Installation process. This lab does not demonstrate any of the Enterprise Offering API’s. Lab Requirements This lab assumes that a Windows Laptop or Desktop machine is available which has the following software installed: - Eclipse Software Development Kit 3.2 - Rational Application Developer v.6.00 - IBM WebSphere Everyplace Deployment Client for Windows and Linux orkplace Client Technology Micro Edition Enterprise Offering v6.0 5.8.1 What you should be able to do WebSphere Everyplace Deployment (WED) is the IBM Smart Client platform that is the foundation of the next generation of IBM Client Software. This includes IBM WebSphere Commerce Sales Centre , Lotus Sametime Connect Client , IBM Workplace Managed Client and the next generation Notes client called Hanover. Building skills in the base platform will enable you to develop applications for a wide range of client environments. At the end of this lab you should be able to understand, use and/or describe: 2022 June, 29 IBM WebSphere Everyplace Deployment orkplace Client Technology - Developer Workshop Page 1 of © Copyright IBM Corporation 2006 5

Upload: vuongphuc

Post on 06-Sep-2018

222 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023 All rights reserved

IBM WEBSPHERE EVERYPLACE DEPLOYMENTORKPLACE CLIENT TECHNOLOGY DEVELOP DEVELOPERER WORKSHOP – LAB EXERCISE

WebSphere Everyplace Deploymentorkplace Client Workshop

WCT Smart ClientRich Application Development Lab

What this exercise is aboutThe objective of this lab is to take you through the steps necessary to develop a Smart ClientRich application that will run within the IBM WebSphere Everyplace Deployment (WED) Client v6.0orkplace Client Technology. WEDCT is based on the Eclipse Rich Client Platform so most of the steps are very similar. This lab will highlight the key extension points for WEDCT. This lab will also take you through the steps to package you application as a feature that can be installed through the WEDCT Installation process. This lab does not demonstrate any of the Enterprise Offering API’s.

Lab RequirementsThis lab assumes that a Windows Laptop or Desktop machine is available which has the following software installed:

- Eclipse Software Development Kit 3.2

- Rational Application Developer v.6.00

- IBM WebSphere Everyplace Deployment Client for Windows and Linuxorkplace Client Technology Micro Edition Enterprise Offering v6.0 5.8.1

What you should be able to doWebSphere Everyplace Deployment (WED) is the IBM Smart Client platform that is the foundation of the next generation of IBM Client Software. This includes IBM WebSphere Commerce Sales Centre, Lotus Sametime Connect Client , IBM Workplace Managed Client and the next generation Notes client called Hanover. Building skills in the base platform will enable you to develop applications for a wide range of client environments.

At the end of this lab you should be able to understand, use and/or describe:

Understand the structure of a WCTWED application.

How to develop the perspectives and views for this application.

How to test the application when deployed in an RCP configuration.

How to test the application in WCTWED using the manual install process.

How to package your RCP/WCTWED application as a feature.

How to install and manage this application within the WCTWED. Platform

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 1 of

© Copyright IBM Corporation 20065

Pat Mc, 03/08/05,
Tried different phrasing here – not sure you’ll like it.
Pat Mc, 06/06/06,
At a glance I think long term you’re going to want to settle on use of terms/language/phrasing. Is it “the WED” or “the WED platform”. I like the latter better in text; makes more sense.
Pat Mc, 03/08/05,
You are really packaging a set of plug-ins; depends on what you include in your feature (the RCP plug-ins could be included as well).
Page 2: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

IntroductionThis lab has been designed to help you become familiar with the development steps for the WCTWED workbench. It will show how simple RCP development can be and what is required to extend your RCP application so it can be installed and managed by the WCTWED workbench.

Exercise InstructionsThe exercise is divided into threefour parts. The first part, Part 1: Developing the RCP/WCTWED application provides the base for the following labs.

Part 2: Testing the application in the Eclipse Workbench

Part 3: Export the application for simple test in WCT

Part 34: Packaging the application as a feature and installing in WCTWED

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 2 of

© Copyright IBM Corporation 20065

Pat Mc, 03/08/05,
Missing part 3?
Page 3: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 1: Developing the core RCP application The application that you will be developing during this lab is a simple business charting application. It will use static data but it will allow you to display different chart views and data between multiple views. The application will reuse a simple SWT based charting plug-in that will be supplied for the lab. The following application is running in RCP mode but gives you an idea of what you are going to create.

WCTWED is based on the RCP so the most of the steps required to build a user interface for a WCTWED target are the same for an RCP target. This lab will focus on the UI parts rather than the invocation of the underlying business services through common industry standard APIs. This will be completed in another development task.

____ 1. The first step that is required before we begin the lab will be to expand the WCTWCTDDevLabCode.zip into the C:\Labs directory. We will be using drag and drop to move source code from the directory to the Eclipse Workbench. Use your favorite ZIP tool to do this expand the file.

____ 2. The next step is to make sure we can start the Eclipse SDKSales Centre Development.

__ a. Select Start->Programs->IBM WebSphere Commerce Developer Enterprise 6.0->IBM Sales Center development environment.

__ b. Create short cut on you desktop to the eclipse.exe that was installed when you expanded the eclipse SDK which was downloaded from the eclipse.org website.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 3 of

© Copyright IBM Corporation 20065

Pat Mc, 03/08/05,
I’d rather put it in a folder… neater.
Pat Mc, 06/06/06,
I guess this is WED terminology; it might be good to correlate Eclipse terms (plug-in, bundle, view, perspective, application) with WED terms.
Page 4: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Edit the short cut properties; we need to define a workspace where we are going to develop the applications. You can do this by adding –data c:\labs\wctapp to the target field in the shortcut properties

Click OK to save the properties

Then double click on the Eclipse shortcut to start the Development Workbench.

Now we have the Workbench up and running we need to start to define the project and build the structure for the application.

Before you start you should have an eclipse screen that looks something like the one below.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 4 of

© Copyright IBM Corporation 20065

Page 5: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Click on the X symbol on the Welcome view tab, this will close the welcome view.

To start we need to create a plug-in project. To do this click on File->New->Plug-in Project. A wizard dialog will appear that will allow you to define the plug-in.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 5 of

© Copyright IBM Corporation 20065

Pat Mc, 03/08/05,
The IDE will offer to switch to the PDE perspective when you create a plug-in project; you could just let that happen and tell them to say yes.
Pat Mc, 03/08/05,
Technically it is a view based on behavior (it can be stacked/dragged like a view); but it does not show up in the show view dialog, only the help>welcome action.
Page 6: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ c. Enter com.ibm.wctlabwctlab.salesinfo as the name of the plug-in. We use the package notation as this is easy to structure the plug-ins. It will also match the plug-in directory.

__ d. You also need to check the “Create an OSGi bundle manifest for the plug-in” this will add direct OSGi support to the plug-in.

__ e. Then click on the Next> button you will be presented with the Plug-in Content page. You can change the provider, version, and other information.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 6 of

© Copyright IBM Corporation 20065

Pat Mc, 03/08/05,
I rephrased, but it may still not be right. Eclipse generates bundle manifests at runtime if you don’t have one; by having one you just get to add OSGi specific definitions to the plug-in.
Page 7: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ f. Click Next> when you are done customizing the content values.

__ g. The New Plug-in Project wizard allows plug-ins to be generated based on a template. Currently RCP is not a template on the list. So all you need to do now is click on the Finish button to create the project.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 7 of

© Copyright IBM Corporation 20065

Pat Mc, 06/06/06,
It is in 3.1, but I’m not sure you even want to bring this up. As far as I’ve learned so far with my side work fiddling, WED is an RCP application so you don’t really want to generate an RCP application with 3.1 (application, branding, and all that stuff); this is beyond views and perspectives that you might need for a WED application.
Pat Mc, 03/08/05,
The case of the plug-in class you get here is different from the case of the plug-in class you provide in the zip file – I did a mass copy and noticed that as a problem in Eclipse. (error dialog) Interestingly, the class name inside is right.
Page 8: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ h. This plug-in project is going to hold the code for the creation of the RCP/WCTWED application. We also need to create a supporting plug-in project that will be used to store the Business Charting code.

__ i. Using the same process, create another plug-in project called com.ibm.wctwctlab.charts

____ 3. Now we have the two base projects we need to complete the configuration of the business chart plug-in. This plug-in is only a container for the java code that draws five different styles of chart using SWT. We will not be using this project to define any views or perspectives. This shows how reusable logic can be contained within its own plug-in.

__ a. Now we have a skeleton plug-in for holding our chart package we can move some of the source code provided into the project.

__ b. Expand tree view of the project until the src view is visible.

__ c. Open the folder the C:\Labs\WCTWCT Lab Code directory and navigate into the Chart Plug-in directory. You will see two folders.

__ d. Navigate into the src folder.

__ e. Drag the com folder into to the src folder in the workbench. You should see the files being copied over.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 8 of

© Copyright IBM Corporation 20065

Page 9: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ f. You should now have a set of packages that contain the SWT Charting package.

__ g. The final step to complete this import is to drag the icons folder into the root of the project.

__ h. This completes the plug-in you will use to support charting in your WCTWED application,application; the plug-in just has to be visible to other plug-ins.

____ 4. Share the code in this plug-in so that others can use it. The code is not visible outside the plug-in unless you declare it so.

__ a. Open the file plugin.xml click on the Runtime tab.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 9 of

© Copyright IBM Corporation 20065

Pat Mc, 03/08/05,
Might already be open in an editor from the wizard.
Pat Mc, 03/08/05,
Final step – I’m done…
Pat Mc, 03/08/05,
Yes, but it seems wrong that the code I’ve added has IBM Confidential in it, along with a scary bit about copyright and patents. Very strongly suggest that this either be removed or new code found. You can’t use this with customers as-is, and if it is confidential you can’t use it. The only option you would have is creating a runtime plugin, JARs only, and let them use the API. After peeking at some more files, it seems like boiler plate. So if it is inaccurate labeling of security, that is still bad (a security geek would say it is worse and they would be right).
Page 10: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ b. In the Library export section click add and select com.ibm.ssw.chart.views from the list.

__ c. Click on OK and the export of the package will be declared in the plug-in manifest file.

You can now save the plug-in file.

____ 5. Continuing within the plugin.xml click on the Bundle Resources tab and then in the Export Packages section click on Add. Within the dialog enter the package com.ibm.ssw.chart.views and then click OK.

____ 6. Before we move on its worth having a look round the source code to get familiar with its structure.

__ a. The com.ibm.ssw.chart package contains the code that draws the SWT widgets that form the chart views.

__ b. The com.ibm.ssw.chart.views package contains the two SWT components that allow the chart view to be created into a view within a perspective.

package com.ibm.ssw.chart.views;

import org.eclipse.jface.action.Action;import org.eclipse.jface.action.IMenuListener;import org.eclipse.jface.action.IMenuManager;import org.eclipse.jface.action.IToolBarManager;import org.eclipse.jface.action.MenuManager;import org.eclipse.jface.dialogs.InputDialog;

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 10 of

© Copyright IBM Corporation 20065

Pat Mc, 03/08/05,
Not sure you need to print all this code, all it will do is get out of date. Give them a couple of class names/method names to find/study and then call it a day.
Page 11: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

import org.eclipse.jface.resource.ImageDescriptor;import org.eclipse.jface.window.Window;import org.eclipse.swt.widgets.Composite;import org.eclipse.swt.widgets.Menu;import org.eclipse.ui.IMemento;import org.eclipse.ui.IViewSite;import org.eclipse.ui.PartInitException;import org.eclipse.ui.part.ViewPart;

import com.ibm.ssw.chart.Chart;import com.ibm.wedwctlab.charts.ChartsPlugin;

public class ChartView extends ViewPart{

private QueryChartView viewer;public static final String ID_VIEW =

"com.ibm.wedwctlab.salesinfo.views.ChartView";

Composite parent;

private Action stackAction, pieAction, parallelAction,plotAction,scatterAction,surfaceAction, propertiesAction;

public static ChartView instance;

public ChartView(){ super(); instance = this;}

public static ChartView getDefault(){

return instance;}

public void createPartControl(Composite parent){

this.parent = parent;

// Create UI Control to manage SQL contentviewer = new QueryChartView(parent);viewer.setChartType(Chart.PARALLEL);

updateChart();

// Create menu and toolbars.createActions();createMenu();createToolbar();createContextMenu();

}

public void updateChart(){ double[][] data = new double[][]{new double[]{100d,200d},new double[]

{300d,400d},new double[]{400d,500d},new double[]{200d,100d}}; String[] labels = new String[]{"2003","2004","2005"}; String[] legends = new String[]{"North","East","South","West"}; // Ok fill chart with Data viewer.setChartData(data,labels,legends); }

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 11 of

© Copyright IBM Corporation 20065

Page 12: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

public void setChartData(double[][] data,String[] labels,String[] legends){

viewer.setChartData(data,labels,legends);}

public void setFocus(){

// set focus to my widget. For a label, this doesn't// make much sense, but for more complex sets of widgets// you would decide which one gets the focus.

}

/** * Create the actions. */public void createActions(){

parallelAction = new Action("Parallel"){

public void run(){

viewer.setChartType(Chart.PARALLEL);

}};

parallelAction.setImageDescriptor(getImageDescriptor("parallel16.gif"));parallelAction.setDescription("This chart will display the chart data in

a Parallel chart style");parallelAction.setText("Parallel");parallelAction.setToolTipText("Parallel Chart view");

stackAction = new Action("Stack"){

public void run(){

viewer.setChartType(Chart.STACK);}

};stackAction.setImageDescriptor(getImageDescriptor("stack16.gif"));

pieAction = new Action("Pie"){

public void run(){

viewer.setChartType(Chart.PIE);}

};pieAction.setImageDescriptor(getImageDescriptor("pie16.gif"));

surfaceAction = new Action("Surface"){

public void run(){

viewer.setChartType(Chart.SURFACE);}

};surfaceAction.setImageDescriptor(getImageDescriptor("surface16.gif"));

plotAction = new Action("Plot"){

public void run(){

viewer.setChartType(Chart.PLOT);}

};plotAction.setImageDescriptor(getImageDescriptor("plot16.gif"));

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 12 of

© Copyright IBM Corporation 20065

Page 13: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

scatterAction = new Action("Scatter"){

public void run(){

viewer.setChartType(Chart.SCATTER);}

};scatterAction.setImageDescriptor(getImageDescriptor("scatter16.gif"));

propertiesAction = new Action("Properties"){

public void run(){

}};

propertiesAction.setImageDescriptor(getImageDescriptor("universal16.gif"));

}

/** * Create menu of View little drop down one */private void createMenu(){

IMenuManager mgr = getViewSite().getActionBars().getMenuManager();mgr.add(parallelAction);mgr.add(stackAction);mgr.add(pieAction);mgr.add(plotAction);mgr.add(scatterAction);mgr.add(surfaceAction);mgr.add(propertiesAction);

}

/** * Create toolbar. */private void createToolbar(){

IToolBarManager mgr = getViewSite().getActionBars().getToolBarManager();mgr.add(stackAction);mgr.add(pieAction);mgr.add(parallelAction);mgr.add(plotAction);mgr.add(scatterAction);mgr.add(surfaceAction);mgr.add(propertiesAction);

}

/** * Create context menu. */private void createContextMenu(){

// Create menu manager.MenuManager menuMgr = new MenuManager();menuMgr.setRemoveAllWhenShown(true);menuMgr.addMenuListener(new IMenuListener(){

public void menuAboutToShow(IMenuManager mgr){

fillContextMenu(mgr);}

});

// Create menu.Menu menu = menuMgr.createContextMenu(parent);parent.setMenu(menu);

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 13 of

© Copyright IBM Corporation 20065

Page 14: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

// Register menu for extension.// getSite().registerContextMenu(menuMgr, viewer);

}

private void fillContextMenu(IMenuManager mgr){

mgr.add(propertiesAction);}

String initialUrl; public void init(IViewSite site, IMemento memento) throws PartInitException { super.init(site); if (memento != null) {

String u = memento.getString("url"); //$NON-NLS-1$ if (u != null) { initialUrl = u; }

} }

/** * Ask user for value. */private String promptForValue(String text, String oldValue){

InputDialog dlg = new InputDialog(getSite().getShell(), "List View", text, oldValue, null);

if (dlg.open() != Window.OK)return null;

return dlg.getValue();}

private ImageDescriptor getImageDescriptor(String image){ ImageDescriptor id = null;

// Retreive Image //id =

ResourceManager.getImageDescriptor(Platform.asLocalURL( ChartsPlugin.imageDescriptorFromPlugin()get.bundle.getEntry( "/icons/"+image)));

id = ChartsPlugin.imageDescriptorFromPlugin("com.ibm.wedwctlab.charts","icons/"+image);

return id;}

}

__ c. The ChartView module subclasses a ViewPart and handles the creation of the view. You can see the code that it is contributing menus and toolbars and is using the QueryChartView to control the charts being displayed.

__ d. If you look inside the QueryChartView you will see that this uses the base Chart widgets to control which ones are being displayed.

____ 7. Now we have the Chart Plug-in in place we are ready to start creating the core User Interface that will drive the Sales Information Rich Client Application.

__ a. The first steps within our plug-in are to define the relationship to the chart plug-in. We are using OSGi based bundles and they use the manifest file to control relationships.

__ b. Expand the project com.ibm.wctlab.salesinfo

__ c. Navigate to the directory META-INF and mouse button two on the file and select Open with->Bundle Manifest Editor.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 14 of

© Copyright IBM Corporation 20065

Pat Mc, 03/08/05,
It might be open already; Note that if you have it open from the wizard, and then open the plugin.xml file, you will get a second editor. The plugin manifest editor is just plain weird. It looks the same regardless of which file is opened (manifest.mf or plugin.xml), but it can be opened for each. Saves sync to the other file without warning.
Pat Mc, 03/08/05,
I’d start a new section here so the numbering starts again at 1. Lets them think they are getting somewhere. This numbered item (7) would be a good intro para under a heading.
Pat Mc, 03/08/05,
This must be driven by the createPartControl method.
Pat Mc, 03/08/05,
Long tem I’d rename this class, it sounds like it is a view, your text seems to suggest it, but it is not a view. It is providing visual content in a view (and maybe later another UI component), but it is not a view. Very confusing name choice when compared with ChartView.
Pat Mc, 03/08/05,
Name the method.
Page 15: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ d. I n the Import Packages section, click on Add button and in the dialog enterwctlabThis will enable the code within the com.ibm.ssw.chart.views , once the package has been found click on OKpackage to be used within our application.

____ 8. We can now start to define the elements for the RCP/WCTWED entry points in the plug-in. To help testing within the Eclipse development environment we add an extension to launch the application as an RCP application. We can also add the extension point so it can be run within the WCTWED workbench.

__ a. Within the com.ibm.wctwctlab.salesinfo project open the plugin.xml file.

__ b. At the top of the file inside the <plugin> tags add the following XML tags.<extension

id="SalesInfo" point="org.eclipse.core.runtime.applications"> <application> <run class="com.ibm.wctlab.salesinfo.SalesInfo"> </run> </application> </extension>

<extension point="com.ibm.eswe.workbench.WctApplication">

<DisplayName>Sales Info</DisplayName> <PerspectiveId>

com.ibm.wctlab.salesinfo.SalesInfoPerspective</PerspectiveId>

<Icon>images/chart.gif</Icon> <Description>Sales Information System</Description> <Version>1.0.0</Version>

</extension>

__ c. The first one is an application extension; an application is code that can be started by the Eclipse platform. The second extension is defining a WCTWED application, these maps to a perspective in your plug-in. You need to define a WCTWED application so that it can become visible in the WCTWED workbench. You can see that it has a display name, icon, description and version number. This is the information that is displayed within the Desktop perspective within the Workbench.

__ d. To enable the RCP application to start an RCP window we need to add a class to the source code.

__ e. Expand the src folder and the com.ibm.wctlab.salesinfo package. Navigate to the C:\Labs\ WCTWCT Lab Code\Sales Info Plugin\src\com\ibm\wctlab\salesinfo directory. Drag the file SalesInfo.java into the package.

__ f. The SalesInfo class implements IPlatformRunnable, this class can be used to start the Workbench.

package com.ibm.wctlab.salesinfo;import org.eclipse.core.runtime.IPlatformRunnable;import org.eclipse.swt.widgets.Display;import org.eclipse.ui.PlatformUI;import org.eclipse.ui.application.WorkbenchAdvisor;

public class SalesInfo implements IPlatformRunnable{ public Object run(Object args) { WorkbenchAdvisor workbenchAdvisor = new SalesInfoWorkbenchAdvisor(); Display display = PlatformUI.createDisplay();

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 15 of

© Copyright IBM Corporation 20065

Pat Mc, 06/06/06,
Terminology? WED Workbench??
Pat Mc, 03/08/05,
Where exactly? On the open application action or somewhere else.
Pat Mc, 03/08/05,
This extension point is not known to pure eclipse; if we could add the plug-in that defines it to the target platform for eclipse you could see help and get all the required assistance in the editor.
Page 16: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

try { int returnCode = PlatformUI.createAndRunWorkbench(display, workbenchAdvisor);

if(returnCode == PlatformUI.RETURN_RESTART) { return IPlatformRunnable.EXIT_RESTART; } else { return IPlatformRunnable.EXIT_OK; } } finally { display.dispose(); } } }

__ g. The code is very simple and creates a Display and then creates and runs a workbench passing in the Workbench advisor. This is the module that controls the display and menus for the UI.

__ h. Drag the file SalesInfoWorkbenchAdvisor.java into the same package.

__ i. The key method in this class is the getInitialWindowsPerspectiveId() this controls what is initial displayed. If you have no menus then this will control the initial perspective view. public String getInitialWindowPerspectiveId() { return SalesInfoPerspective.ID_PERSPECTIVE; }

public void preWindowOpen(IWorkbenchWindowConfigurer configurer) { super.preWindowOpen(configurer);

configurer.setInitialSize(new Point(800,600)); configurer.setShowMenuBar(true); configurer.setShowCoolBar(false); configurer.setShowPerspectiveBar(false);

configurer.setTitle("Sales Information Rich Client v1.0");

}

__ j. The preWindowOpen method allows last minute tailoring of the UI.

__ k. This Rich application will be using images. Drag the Utils.java into the same package this module controls the loading of images into a registry.

____ 9. The next extension point to define in the plugin.xml is the perspectives.

__ a. Open the plugin.xml file and within the source view add the following tags to define the perspective.

<extension point="org.eclipse.ui.perspectives"> <perspective name="Sales Info"

fixed="false" class="com.ibm.wctlab.salesinfo.SalesInfoPerspective" icon="icon/folder.gif"

id="com.ibm.wctlab.salesinfo.SalesInfoPerspective"> </perspective>

</extension>

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 16 of

© Copyright IBM Corporation 20065

Pat Mc, 03/08/05,
I’d recommend reworking this in the future, maybe not for your first/next class, but soon. You will get feedback about the fact that they do not know what/why they did all this. The steps in our RCP exercise apply here, and they could be reworked to fit your flow.
Pat Mc, 03/08/05,
If you want to given them this much code, why not give them a plug-in project to import – then it is all done at once.
Page 17: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ b. You can see in this declaration the linking of the perspective to a class that will control the layout of the contents of the perspective. You can supply names, icons and other settings.

__ c. From the C:\Labs\WCT Lab Code\Sales Info Plugin\src\com\ibm\wctlab\salesinfo directory drag the file SalesInfoPerspective.java into the com.ibm.wctlab.salesinfo package.

__ d. This module controls the initial display of the perspective based on the views that we will define later.

package com.ibm.wctlab.salesinfo;

import org.eclipse.ui.IFolderLayout;import org.eclipse.ui.IPageLayout;import org.eclipse.ui.IPerspectiveFactory;

import com.ibm.wctlab.salesinfo.views.ViewTopBanner;

public class SalesInfoPerspective implements IPerspectiveFactory{ public static final String ID_PERSPECTIVE = "com.ibm.wctlab.salesinfo.SalesInfoPerspective";

public SalesInfoPerspective() { }

public void createInitialLayout(IPageLayout layout) {

// default folder names, if it is not specified in RcpApplication.properties String topBannerFolderID = "topBannerFolder"; String topLeftFolderID = "topLeftFolder"; float topBannerFolderRatio = 0.14f; // topBannerFolder / editorArea

float topLeftFolderRatio = 0.34f; // topLeftFolder / editorArea IFolderLayout topBannerFolder; IFolderLayout topLeftFolder; layout.setEditorAreaVisible(false); String editorArea = layout.getEditorArea();

layout.addStandaloneView(ViewTopBanner.ID_VIEW, false,IPageLayout.TOP, topBannerFolderRatio, editorArea);

topLeftFolder = layout.createFolder(topLeftFolderID, IPageLayout.LEFT, topLeftFolderRatio , editorArea); // Add the Chart View topLeftFolder.addView("com.ibm.wctlab.salesinfo.chartView"); }}

__ e. The perspective has a branding view at the top called the topbanner and a view at the bottom; the “com.ibm.wctlab.salesinfo.chartview” has not yet been defined.

____ 10. Its now time to define the view within the plugin.xml. If you remember this view is maintained in the com.ibm.wctlab.chart plug-in project. So all we need to do is reference it.

__ a. Add the following tags to the plugin.xml file. <extension point="org.eclipse.ui.views"> <category name="Bankdemo"

id="com.ibm.wctlab.salesinfo.view.Category">

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 17 of

© Copyright IBM Corporation 20065

Pat Mc, 03/08/05,
I get an error here; ViewTopBanner.ID_VIEW not found.
Pat Mc, 03/08/05,
To avoid typing and typos you should give them a file with the xml inside in the zip itself.
Page 18: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

</category>

<view class="com.ibm.wctlab.salesinfo.views.ViewTopBanner"

category="com.ibm.wctlab.salesinfo.view.Category" name="Top Banner" id="com.ibm.wctlab.salesinfo.views.ViewTopBanner">

</view>

<view id="com.ibm.wctlab.salesinfo.chartView" name="Chart View"

icon="icons/sample.gif" category="com.ibm.wctlab.salesinfo.view.Category"

class="com.ibm.ssw.chart.views.ChartView" allowMultiple="true"> </view>

</extension>

__ b. We define the two views and the associated classes that will control the display. The ChartView class is help in the other project. ViewTopBanner is a simple class that displays a branding image at the top of the perspective.

__ c. We need to add the ViewTopBanner class to our source code. To do this we need to create a package called com.ibm.wctlab.salesinfo.views. Once you have completed this navigate to the C:\Labs\WCTWCT Lab Code\Sales Info Plugin\src\com\ibm\wctlab\salesinfo\views directory.

__ d. Drag the file ViewTopBanner.java into the package.

__ e. This file using a simple paint routine to draw images into the Canvas of the view part.

package com.ibm.wctlab.salesinfo.views;

import org.eclipse.swt.SWT;import org.eclipse.swt.events.PaintEvent;import org.eclipse.swt.events.PaintListener;import org.eclipse.swt.graphics.Color;import org.eclipse.swt.graphics.GC;import org.eclipse.swt.graphics.Image;import org.eclipse.swt.graphics.Rectangle;import org.eclipse.swt.widgets.Canvas;import org.eclipse.swt.widgets.Composite;import org.eclipse.ui.part.ViewPart;import com.ibm.wctlab.salesinfo.*;

public class ViewTopBanner extends ViewPart{ public static final String ID_VIEW = "com.ibm.wctlab.salesinfo.views.ViewTopBanner";

private static ViewTopBanner instance; private static Composite vParent;

//private GC gc = null; private Rectangle rImgBanner, rImgIBM, rImgODB; private Canvas cMain; private Color cbg;

private Image imgIBM = Utils.getImageRegistry().get(Utils.IMAGE_IBM_LOGO_ID); private Image imgODB = Utils.getImageRegistry().get(Utils.IMAGE_ODB_LOGO_ID);

public ViewTopBanner() { super(); instance = this;

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 18 of

© Copyright IBM Corporation 20065

Page 19: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

}

public static ViewTopBanner getDefault() { return instance; }

public void createPartControl(Composite parent) { cMain = new Canvas(parent, SWT.NONE); vParent = cMain;

cbg = new Color(cMain.getDisplay(),0x00, 0x00, 0x00);

rImgIBM = imgIBM.getBounds(); rImgODB = imgODB.getBounds();

cMain.addPaintListener(new PaintListener() { public void paintControl(PaintEvent e) { GC gc = e.gc; Rectangle bounds = ((Canvas)e.widget).getBounds(); gc.setBackground(cbg); gc.fillRectangle(bounds);

gc.drawImage(imgIBM, 0, bounds.height > rImgIBM.height ? (bounds.height - rImgIBM.height) / 2 : 0); gc.drawImage(imgODB, bounds.width - rImgODB.width, (bounds.height - rImgODB.height) / 2); } }); }

public void setFocus() { }

public void dispose() { // dispose any resources, fonts, images, etc. if (cbg != null) { cbg.dispose(); } }}

__ f. This view will paint an IBM logo on the left and an On Demand logo on the right. You can replace these images with your own to change the branding.

____ 11. So now the application is progressing in function but we need to start thinking about some of the other elements out side the main UI; this could include menus and preference pages. You now need to add a menu bar to the application that is only displayed when the perspective is visible.

__ a. Menus can be programmatically added through the Workbench advisor or through the tag declaration in the plugin.xml. To keep it simple lets use the plugin.xml method.

__ b. Add the following tags to the plugin.xml file.<extension

point="org.eclipse.ui.actionSets"> <actionSet label="Regions" visible="false" id="com.ibm.wctlab.actionSet"> <menu

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 19 of

© Copyright IBM Corporation 20065

Page 20: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

label="&amp;Regions" id="regions"> </menu> <action label="&amp;South" class="com.ibm.wctlab.salesinfo.actions.SouthAction" menubarPath="regions/south" id="com.ibm.wctlab.actions.South"> </action> <action label="&amp;West" class="com.ibm.wctlab.salesinfo.actions.WestAction" menubarPath="regions/west" id="com.ibm.wctlab.actions.West"> </action> <action label="&amp;East" class="com.ibm.wctlab.salesinfo.actions.EastAction" menubarPath="regions/east" id="com.ibm.wctlab.actions.East"> </action> <action label="&amp;North" class="com.ibm.wctlab.salesinfo.actions.NorthAction" menubarPath="regions/north" id="com.ibm.wctlab.actions.North"> </action> </actionSet>

</extension>

__ c. This declares the menu actions as action sets each action can have a separate class to handle them. Or once class and then differentiate from each invocation.

__ d. Within this lab we will add in the NorthAction class, the rest will be left to you to implement.

__ e. Within the src directory create a package called com.ibm.wctlab.salesinfo.actions .

__ f. Then navigate to the desktop directory C;\Labs\WCT LabWCT Lab Code\Sales Info Plugin\src\com\ibm\wctlab\salesinfo\actions directory and drag the module NorthAction.java into the package.

__ g. You can see the code below. Is again very simple it just changes the data within the instance of the ChartView.

package com.ibm.wctlab.salesinfo.actions;

import org.eclipse.jface.action.IAction;import org.eclipse.jface.viewers.ISelection;import org.eclipse.ui.IWorkbenchWindow;import org.eclipse.ui.IWorkbenchWindowActionDelegate;

import com.ibm.ssw.chart.views.ChartView;

/** * @author Administrator * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */public class NorthAction implements IWorkbenchWindowActionDelegate{

private IWorkbenchWindow window = null;

public void run(IAction action) { double[][] data = new double[][]{

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 20 of

© Copyright IBM Corporation 20065

Page 21: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

new double[]{50,275d},new double[]{175d,25d},new double[]{80d,250d},new double[]{125d,100d}};

String[] labels = new String[]{"2004","2005","2005"}; String[] legends = new String[]{"Banking","Retail","SMB","Public"};

ChartView.getDefault().setChartData(data,labels,legends); }

/* (non-Javadoc) * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose() */public void dispose() {

}/* (non-Javadoc) * @see

org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow) */public void init(IWorkbenchWindow window) {

this.window = window;

}/* (non-Javadoc) * @see

org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)

*/public void selectionChanged(IAction action, ISelection selection) {

}}

__ h. Using the base code for the NorthAction create the actions for the other regions and modify the base data.

__ i. The final step is to relate the action sets to the perspective. To do this we add the following tags to the plugin.xml file. <extension point="org.eclipse.ui.perspectiveExtensions"> <perspectiveExtension targetID="com.ibm.wctlab.salesinfo.SalesInfoPerspective"> <actionSet id="com.ibm.wctlab.actionSet"> </actionSet> </perspectiveExtension> </extension>

__ j. You can see the link between the Perspective and the action set are declared.

____ 12. The final piece of code is the preference page. Although in this lab the preference will not be used we can use this as a place holder as we extend the application. The key point to make is that adding these pages is very simple.

__ a. Preferences are name value pairs that are stored in the workspace of a running application. For general best practice is to declare the preference tags within the module controlling the plug-in.

__ b. Open the module SalesIinfoPlugin.java within the com.ibm.wctlab.salesinfo package.

__ c. At the top of the module add the following static variables.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 21 of

© Copyright IBM Corporation 20065

Pat Mc, 03/09/05,
Don’t bother with the code if you don’t add the extension to open the page. The option to open the Preferences dialog is in the code when run, so use it.
Page 22: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

// PREFERENCESpublic static final String HOST_PREF = "host";public static final String PORT_PREF = "port";public static final String WEBSERVICE_PREF = "webservice";public static final String ADVERT_PREF = "advert";

__ d. Save the module.

__ e. Now create a new package called com.ibm.wctlab.salesinfo.settings

__ f. Navigate to the directory called C:\Labs\WCT LabWCT Lab Code\Sales Info Plugin\src\com\ibm\wctlab\salesinfo\settings and drag the file ServerDetails.java into the package.

__ g. You can see in this how straight forward it is to read and update preference from the preferences store.

/* * Created on 09-Aug-2004 * * TODO To change the template for this generated file go to * Window - Preferences - Java - Code Style - Code Templates */package com.ibm.wctlab.salesinfo.settings;

import org.eclipse.jface.preference.PreferencePage;import org.eclipse.swt.SWT;import org.eclipse.swt.layout.FormAttachment;import org.eclipse.swt.layout.FormData;import org.eclipse.swt.layout.FormLayout;import org.eclipse.swt.widgets.Composite;import org.eclipse.swt.widgets.Control;import org.eclipse.swt.widgets.Label;import org.eclipse.swt.widgets.Text;import org.eclipse.ui.IWorkbench;import org.eclipse.ui.IWorkbenchPreferencePage;import org.eclipse.ui.plugin.AbstractUIPlugin;

import com.ibm.wctlab.salesinfo.SalesInfoPlugin;

/** * @author Matthew * * TODO To change the template for this generated type comment go to * Window - Preferences - Java - Code Style - Code Templates */public class ServerDetails extends PreferencePage implements IWorkbenchPreferencePage {

private Text host_port;private Text host;private Text webservice;private Text advert;

public ServerDetails() {super();

}

public Control createContents(Composite parent) {Composite container = new Composite(parent, SWT.NULL);container.setLayout(new FormLayout());

final Label label = new Label(container, SWT.NONE);final FormData formData = new FormData();formData.bottom = new FormAttachment(0, 35);formData.top = new FormAttachment(0, 15);formData.right = new FormAttachment(0, 55);formData.left = new FormAttachment(0, 0);label.setLayoutData(formData);

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 22 of

© Copyright IBM Corporation 20065

Page 23: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

label.setText("Host Server");

host = new Text(container, SWT.BORDER);final FormData formData_1 = new FormData();formData_1.bottom = new FormAttachment(label, 20, SWT.TOP);formData_1.top = new FormAttachment(label, 0, SWT.TOP);formData_1.right = new FormAttachment(label, 200, SWT.RIGHT);formData_1.left = new FormAttachment(label, 65, SWT.RIGHT);host.setLayoutData(formData_1);

host_port = new Text(container, SWT.BORDER);

final FormData formData_2 = new FormData();formData_2.bottom = new FormAttachment(label, 30, SWT.BOTTOM);formData_2.top = new FormAttachment(label, 10, SWT.BOTTOM);formData_2.right = new FormAttachment(host, 80, SWT.LEFT);formData_2.left = new FormAttachment(host, 0, SWT.LEFT);host_port.setLayoutData(formData_2);

final Label label_1 = new Label(container, SWT.NONE);final FormData formData_3 = new FormData();formData_3.bottom = new FormAttachment(host_port, 20, SWT.TOP);formData_3.top = new FormAttachment(host_port, 0, SWT.TOP);formData_3.right = new FormAttachment(label, 50, SWT.LEFT);formData_3.left = new FormAttachment(label, 0, SWT.LEFT);label_1.setLayoutData(formData_3);label_1.setText("Port");

final Label label_2 = new Label(container, SWT.NONE);final FormData formData_4 = new FormData();formData_4.bottom = new FormAttachment(0, 90);formData_4.left = new FormAttachment(label_2, 0, SWT.LEFT);label_2.setLayoutData(formData_4);label_2.setText("WebService");

webservice = new Text(container, SWT.BORDER);

final FormData formData_5 = new FormData();formData_5.right = new FormAttachment(0, 325);formData_5.top = new FormAttachment(label_2, 0, SWT.TOP);formData_5.left = new FormAttachment(host_port, 0, SWT.LEFT);webservice.setLayoutData(formData_5);

advert = new Text(container, SWT.BORDER);final FormData formData_6 = new FormData();formData_6.top = new FormAttachment(0, 110);formData_6.left = new FormAttachment(host, 0, SWT.LEFT);advert.setLayoutData(formData_6);

final Label label_3 = new Label(container, SWT.NONE);final FormData formData_7 = new FormData();formData_7.top = new FormAttachment(webservice,35,SWT.TOP);formData_7.left = new FormAttachment(label_2, 0, SWT.LEFT);label_3.setLayoutData(formData_7);label_3.setText("Advert Servlet");

/*final Button button = new Button(container, SWT.CHECK);final FormData formData_8 = new FormData();formData_8.top = new FormAttachment(0, 145);formData_8.left = new FormAttachment(label_2, 25, SWT.RIGHT);button.setLayoutData(formData_8);button.setText("Secure Services");*/

// Update the Screen with the details. host.setText(getPreferenceStore().getString(SalesInfoPlugin.HOST_PREF));

host_port.setText(getPreferenceStore().getString(SalesInfoPlugin.PORT_PREF));

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 23 of

© Copyright IBM Corporation 20065

Page 24: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

webservice.setText(getPreferenceStore().getString(SalesInfoPlugin.WEBSERVICE_PREF));

advert.setText(getPreferenceStore().getString(SalesInfoPlugin.ADVERT_PREF));

//return container;

}

public void init(IWorkbench workbench) { SalesInfoPlugin qp = SalesInfoPlugin.getDefault(); if(qp instanceof AbstractUIPlugin) { AbstractUIPlugin uiPlugin = (AbstractUIPlugin) qp; this.setPreferenceStore(uiPlugin.getPreferenceStore()); } }

public boolean performOk(){ // Update the Screen getPreferenceStore().setValue(SalesInfoPlugin.HOST_PREF,host.getText());

getPreferenceStore().setValue(SalesInfoPlugin.PORT_PREF,host_port.getText());

getPreferenceStore().setValue(SalesInfoPlugin.WEBSERVICE_PREF,webservice.getText());

getPreferenceStore().setValue(SalesInfoPlugin.ADVERT_PREF,advert.getText()); return super.performOk();}

}

Note: This now completes the code parts of the plug-in creation, we now need to include the images.

____ 13. To add some image content to the application and within the top banner view we have included a couple of image directories that need to be added to the project.

__ a. Navigate to the C:\Labs\WCT LabWCT Lab Code\Sales Info Plugin and drag the directories images and icons to the root of the com.ibm.wctlab.salesinfo project.

__ b. This now concludes the development steps for the project.

__ c. We now need to move on and look at testing our applications.

____ 14. When you come to packaging and building the plug-ins you will need to define the files that are required to be exported with each plug-in.

__ a. To do this, open the plugin.xml for the com.ibm.wctlab.chart project.

__ b. Click on the Build tab

__ c. Within the Binary Build section make sure the following directories are selected including the icon directory.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 24 of

© Copyright IBM Corporation 20065

Pat Mc, 03/08/05,
The other entries did not have a, b, c indicators, but that might be word wigging out.
Page 25: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ d. This defines the files in the project that will be export or packaged for a build.

__ e. You can now save the plugin.xml file.

__ f. Open the plugin.xml file for the com.ibm.wctlab.salesinfo project

__ g. Click on the Build tab

__ h. Do the same as the previous project and check the icons and images directories.

__ i. You can now save the plugin.xml file.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 25 of

© Copyright IBM Corporation 20065

Page 26: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 2: Testing the application in the Eclipse WorkbenchWe are now ready to test the application that you have constructed. It is possible to define the WCTWED Workbench as a runtime testing environment. To save time and because we have declared the RCP entry point we can easily launch the application using the Eclipse Test environment.

____ 1. Eclipse has a similar mechanism for creating test environment definitions for each test. To do this we can follow the steps below.

__ a. Click on the down arrow on the big green arrow on the top toolbar.

__ b. This will drop down a menu you then click on the Run… option.

__ c. This will display the run dialog.

__ d. Click on the list item Run-time Workbench and then click on the New button.

__ e. Name the configuration Sales Info at the top of the dialog.

__ f. Then select the application from the Run as application: drop list. You should select the item com.ibm.wctlab.salesinfo.SalesInfo

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 26 of

© Copyright IBM Corporation 20065

Page 27: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ g. You then need to move to the plug-ins tabs.

__ h. Click on the radio “Choose plug-ins and fragments to launch from the list”

__ i. Then deselect all the plug-ins and then select the two that you have created at the top.

__ j. Then click on the Add Required Plug-ins button. This will workout which plug-ins are required by the RCP runtime.

__ k. Click on Apply button this will save run configuration

____ 2. So you can now see if the application will run.

__ a. Click on the Run button within the Run dialog.

__ b. You should now see the view below.

__ c. You should be able to click on the Regions->North you should see the chart data change. You can then click on the toolbar icons on the chart, This will chat the view to another chart type.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 27 of

© Copyright IBM Corporation 20065

Page 28: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ d. You will remember that the management of the ChartView is completely controlled by the com.ibm.wctlab.chart plug-in. Although you are supplying data to it from the Sales Info plug-in.

Note: This now concludes the simple testing using Eclipse

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 28 of

© Copyright IBM Corporation 20065

Page 29: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 3: Exporting the application for a simple test in WCT

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 29 of

© Copyright IBM Corporation 20065

Pat Mc, 03/09/05,
XXXXXXXXXXXXXX I stopped here. XXXXXXXXXXXXXXXXXXXXX
Page 30: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

[Part 4:] WCT allows formal installation of features or applications but you can also just export the plug-ins into the correct directory. This is useful just to check that the application is functioning correctly within WCT.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 30 of

© Copyright IBM Corporation 20065

Page 31: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 4:[Part 5:] You should already have an installed version of IBM Workplace Client Enterprise Micro Edition Enterprise Offering v5.8.1. Once you have located it on your machine follow the steps below to test the application.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 31 of

© Copyright IBM Corporation 20065

Page 32: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 5:[Part 6:] Within the Eclipse Workbench click on the File->Export this will display the Export dialog

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 32 of

© Copyright IBM Corporation 20065

Page 33: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 6:[Part 7:]

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 33 of

© Copyright IBM Corporation 20065

Page 34: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 7:[Part 8:] Select the Deployable plug-ins and fragments option and then click on the Next> button

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 34 of

© Copyright IBM Corporation 20065

Page 35: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 8:[Part 9:] Within the next panel select the two plug-ins that are displayed.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 35 of

© Copyright IBM Corporation 20065

Page 36: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 9:[Part 10:]

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 36 of

© Copyright IBM Corporation 20065

Page 37: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 10:[Part 11:] Then select a directory structure as the Deploy As: option

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 37 of

© Copyright IBM Corporation 20065

Page 38: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

[Part 12:] Then click on the Browse button for the Directory and navigate to the correct directory. On the machine that this lab was created it the directory is C:\IBM\WCTME_EO\apps\eclipse directory.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 38 of

© Copyright IBM Corporation 20065

Page 39: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 11:[Part 13:]

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 39 of

© Copyright IBM Corporation 20065

Page 40: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

[Part 14:] Check this directory is correct on your WCT ME installation.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 40 of

© Copyright IBM Corporation 20065

Page 41: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

[Part 15:] Then Click OK to close the directory navigator and then click on Finish to export the plug-ins to the WCT runtime environment.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 41 of

© Copyright IBM Corporation 20065

Page 42: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

[Part 16:] We are now ready to test the application within the WCT workbench.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 42 of

© Copyright IBM Corporation 20065

Page 43: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

[Part 17:] Launch the WCT Workbench.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 43 of

© Copyright IBM Corporation 20065

Page 44: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 12:[Part 18:] Click on the Open->Desktop menu item.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 44 of

© Copyright IBM Corporation 20065

Page 45: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 13:[Part 19:] You should see the Sales Info application registered on the Desktop.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 45 of

© Copyright IBM Corporation 20065

Page 46: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 14:[Part 20:] Click on the Sales Info application.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 46 of

© Copyright IBM Corporation 20065

Page 47: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 15:[Part 21:] You should see the following familiar application displayed.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 47 of

© Copyright IBM Corporation 20065

Page 48: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 16:[Part 22:] Before you complete this section of the lab, remove the plugin manually from the apps\eclipse\plugins directory.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 48 of

© Copyright IBM Corporation 20065

Page 49: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 17:[Part 23:]

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 49 of

© Copyright IBM Corporation 20065

Page 50: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

[Part 24:] This concludes the simple test of of the application within the WCT workbench.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 50 of

© Copyright IBM Corporation 20065

Page 51: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

Part 18:[Part 25:] Packaging the application as a featureThe following section of will take you through the steps needed to configure the developed Sales Info application as an installable feature. The steps below use all the key parts of the Eclipse IDE needed to create a feature and a site using the IDE environment. These steps can be recreated for any WCTWED or RCP application.

____ 1. The first steps to start building the application as a feature is to package and build the two plugins.

__ a. To do this make sure you are within the PDE Perspective.

__ b. Expand the com.ibm.wctlab.charts project.

__ c. Mouse button two on the plugin.xml file and select the menu PDE Tools->Create Ant Build File.

__ d. You will see a file build.xml be created inside the project.

__ e. On the context menu for the build.xml file select Run and then select the second Ant Build…

__ f. The Ant Build dialog will appear.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 51 of

© Copyright IBM Corporation 20065

Page 52: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ g. Make sure the Target build.update.jar is selected and then click on Run.

__ h. This will use Ant to create a packaged version of the plugin that can be used with the feature and site.

__ i. Refresh the project and you should see the package jar file now in the project.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 52 of

© Copyright IBM Corporation 20065

Page 53: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ j. Repeat this process for the com.ibm.wctlab.salesinfo plugin.

____ 2. Now we have the two plugins packaged we can start to look at how to create these into a feature.

__ a. To create a new feature project select File->New->Other

__ b. Select from the Plug-in Development folder the Feature Project

__ c. Click on Next>

__ d. On the next screen type in the name of the project as com.ibm.wctlab.salesinfo.feature

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 53 of

© Copyright IBM Corporation 20065

Page 54: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ e. Then click on the Next> button.

__ f. On the next panel change the Feature Name: to Sales Info Feature and the Feature Provider to your company name or IBM.

__ g. Click Next>

__ h. Select the two plugins com.ibm.wctlab.charts and com.ibm.wctlab.salesinfo from the list of plugins.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 54 of

© Copyright IBM Corporation 20065

Page 55: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ i. Then click on the Finish button to complete the creation of the project.

____ 3. The next step is to add the supporting information for the feature.

__ a. Open up the file feature.xml and select the Information tab.

__ b. In the Feature Description optional URL change it to http://www.ibm.com/software

__ c. In the Text: Sections add the following text.Sales Info Rich Client Application v1.0

__ d. Click on the Copyright Notice tab and change the url to the same as above.

__ e. Cut and paste the contents of the file C:\Labs\WCT LabWCT Lab Code\Feature\copyright.txt into the Text: area.

__ f. Do the same for the License Agreement Tab using the text in the license.txt

__ g. Now save the feature.xml file.

__ h. Switch to the Content tab of the feature.xml

__ i. Click on the Add button for the Feature Plug-ins and Fragments

__ j. From the dialog select the two list plugins.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 55 of

© Copyright IBM Corporation 20065

Page 56: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ k. Now select save for the feature.

____ 4. We are now in a position to build the feature.

__ a. To do this we need to create a build file for the feature.xml file.

__ b. Select the context menu for the file and select PDE Tools->Create Ant Build File

__ c. Using the context menu on the build.xml file select the second Ant Run option.

__ d. Make sure the build.update.jar target has been selected and the click on the Run button.

__ e. Refresh the project.

____ 5. We are now in the position to create the Site project that will hold the feature.

__ a. Select the menu File->New->Other and the select Update Site Project from the Plug-in Development folder.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 56 of

© Copyright IBM Corporation 20065

Page 57: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ b. Select Next>

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 57 of

© Copyright IBM Corporation 20065

Page 58: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ c. Type in the name com.ibm.wctlab.salesinfo.site and the click on the Finish button

__ d. You should be looking at the site.xml file.

__ e. In the Features to Build section click on the Add… button

__ f. Select the feature and click Finish

__ g. In the Features To Publish click on the New Category…

__ h. In the New Category Definition dialog enter the information in the screen shot.

__ i. Click on the OK button

__ j. Click on the Build All button to get the plugins build and moved into the site project.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 58 of

© Copyright IBM Corporation 20065

Page 59: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ k. After the build process has completed click on the context menu for the Features to Build and select Publish

__ l. This will add the feature in the Features to Publish list, you then need drag the feature so it’s a child of the Sales Productivity Category.

__ m. Save the site.xml file and then close it

____ 6. We are now ready to export our finish site ready to be installed in the WCTWED workbench.

__ a. Before we begin you should have a site project that looks like the following screen shot.

__ b. Click on the com.ibm.wctlab.salesinfo.site project and select File->Export

__ c. On the export dialog select the Zip file and then the Next> button.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 59 of

© Copyright IBM Corporation 20065

Page 60: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ d. Firstly deselect the com.ibm.wctlab.salesinfo.site this will prevent the export of the zip places the contents into a folder called com/ibm/wctlab/salesinfo/site. You then need to select the folders features and plugins and then in the right hand list select site.xml

__ e. Change the To zip file: to C:\Labs\salesinfo-feature.zip

__ f. Change the radio button at the bottom to Create only selected directories.

__ g. Then click on the Finish button. The feature and site should not be created.

____ 7. We can now finish by testing the installation of the application within the WCTWED Workbench.

__ a. Open the WCTWED Workbench.

__ b. Install the application as a local jar/zip file from the C:\Labs\salesinfo-feature.zip

__ c. During the installation check that the information supplier during the site and feature creations is displayed in the installation dialogs.

__ d. When the WCTWED workbench restarts you should have a new menu option call Sales Info select this and the following application will be displayed.a desktop with the following icon on it.

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 60 of

© Copyright IBM Corporation 20065

Page 61: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ e.

__ f. You should see the Sales Info application installed.

__ g. Click on the application and test that it starts.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 61 of

© Copyright IBM Corporation 20065

Page 62: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

2023 May, 10 IBM WebSphere Everyplace Deployment orkplace Client Technology- Developer Workshop Page 62 of

© Copyright IBM Corporation 20065

Page 63: WPF Advanced WPF Lab - IBM€¦  · Web viewThe other entries did not have a, b, c indicators, but that might be word wigging out. XXXXXXXXXXXXXX. I stopped here. XXXXXXXXXXXXXXXXXXXXX

© Copyright IBM Corporation 2023. All rights reserved

__ h. If you see the Sales application you have now completed this lab.

2023 May, 10 IBM WebSphere Everyplace Deployment -orkplace Client Technology Developer Workshop Page 63 of

© Copyright IBM Corporation 20065