Search
Contribute
Navigation
- 8.5+
- actions
- advanced features
- advantages of composite applications
- API
- app dev
- basic NSF application
- basics
- benefits
- Best practices
- Best practices
- BIRT
- browser
- built-in actions
- built-in properties
- business value
- CAE
- CAI
- catalog
- changing page properties
- compatibility
- component
- component library
- component properties
- components
- Composite Application basics
- Composite Application basics
- composite application demonstration
- composite applications
- container
- container components
- context
- creating a sidebar
- creating wiring properties
- customer interests
- data model
- debugging
- demo
- demonstration
- deploying
- deploying applications
- deploying NSF components
- deployment
- drag and drop
- easy
- ECL settings
- Eclipse
- Eclipse API
- Eclipse basics
- Eclipse components
- Eclipse samples
- Eclipse tips
- editing properties
- education
- embedded browser
- enablement
- errors
- Expeditor
- Expeditor samples
- Expeditor toolkit
- extensions
- FAQ
- feature rules
- first application
- fundamentals of Eclipse
- general debugging tips
- generic container
- getting started
- glossary
- Greenhouse
- hod
- host on demand
- how to
- Java components
- lead manager
- live text
- local
- Lotus Expeditor
- Lotus Notes component advanced development
- Lotus Notes component development in Composite Applications
- Lotus Notes components
- Lotus Notes components
- Lotusphere
- LS09
- match rules
- my first wire
- navigation
- navigators
- new applications
- new user
- new users
- Notes
- Notes 8
- Notes components
- Notes View
- Notes @formulas
- Notes8_5
- NSF-based composite applications
- NSF components
- NSFs
- opening pages
- out-of-the-box components
- overview
- page navigation
- page properties
- pages
- passing context
- PIM components
- plugins
- Portal
- product information
- product wikis
- productivity tools
- properties
- property
- property broker
- property broker editor
- Property Broker Monitor tool
- property to property
- provisioning
- questions
- resources
- roadmap
- running in context
- sample composite application
- samples
- service oriented architecture
- setting component properties
- setting up
- sidebar
- skills
- SOA
- Symphony
- Symphony view component
- toolkit
- tools
- topology peek tool
- troubleshooting
- tutorial
- Tutorials
- uninstalling composite applications
- update site
- updates
- user interface planning
- video
- view
- web container
- web services
- widgets
- wires
- wiring
- wiring properties
- wiring tutorial
- WSDL
- .ca
- @formulas
Go elsewhere
Wiring to a Sidebar Component
![]() |
Tutorials
sidebar , wiring , tutorial |
Kevin Bergin 11/07/2008 |
Julie Forgo 11/18/2008 |
Wiring to a Sidebar Component
Prerequisites
If you are not familiar with creating Eclipse plug-ins, read the Eclipse tutorial on this wiki first.
Configure your Eclipse environment for launching Notes from the IDE, as described on this wiki.
Follow the steps in the tutorial on this wiki that shows how to create a sidebar component. It is available at http://www-10.lotus.com/ldd/compappwiki.nsf/dx/creating-a-sidebar-panel. This tutorial builds on that component.
Introduction
In Lotus Notes 8.5 and Lotus Expeditor 6.2, composite applications can display components in the sidebar, and also interact with components that are already in the sidebar. This tutorial shows how to interact with components that already exist in the sidebar. These sidebar components are not a part of a composite application, but they can receive information from a composite application.
This tutorial creates a simple sidebar component for Lotus Notes 8.5 that can be wired to components in a composite application. You can use the component to record Web sites that you have visited, Notes documents you have selected, and so on.
Creating the sidebar component
1. If you have not already done so, follow the steps in the tutorial at http://www-10.lotus.com/ldd/compappwiki.nsf/dx/creating-a-sidebar-panel to create a sidebar component.
2. We must make some changes to the sidebar component user interface. We will use a table to record a list of Web sites that have been visited.
3. Attached to this tutorial is a Java file with code required for this tutorial. It creates a table to store up to thirty values published by a composite application, and a method to add these values to the table. Add the code from the file to the "SampleView" class.
Creating the WSDL
1. Note: The tutorial at : http://www-10.lotus.com/ldd/compappwiki.nsf/dx/developing-an-eclipse-component-for-lotus-notes-8-part-2,
covers creating a WSDL file in more detail than is presented here.
2. To create a WSDL file with the Expeditor toolkit, right-click the project in Eclipse. and select "New > Other". Expand the "Client Services" folder, and select "Wiring Properties".
3. Name the file "sample.wsdl" and click Finish.
4. In the Property Broker Editor view, select the 'Actions' tab.
5. Create an action called 'setText', and set the title as 'Text'.
6. In the 'Action Input Parameter' section, set the name as 'TextValue', and leave the type as 'String'.
The WSDL file should now be visible in the our project folder.
7. In the Eclipse project, open the plug-in manifest.
8. On the Dependencies tab, add the plug-ins "com.ibm.rcp.propertybroker' and 'com.ibm.rcp.propertybroker.swt'.
9. On the Extensions tab, add the extension 'com.ibm.rcp.propertybroker.PropertyBrokerDefinitions'.
10. Specify 'sample.wsdl' as the file name, and 'SWT_ACTION' as the type.
11. Create a new class to handle the action. Right-click the project and select New > Class.
12. Name the class 'Handler', and the package 'ActionHandler', and implement the IHandler (org.eclipse.core.commands.IHandler) interface.
13. Set the class field of PropertyBrokerDefinitions extension to 'ActionHandler.Handler'.
Consuming an action
1. In the 'Handler' class we must replace the 'execute' method which is inherited from the IHandler interface with the following code:
public Object execute(ExecutionEvent event) throws ExecutionException {
if (event.getTrigge r() instanceof PropertyChangeEvent) {
final Display display = Display.getDefault();final PropertyChangeEvent pce = (PropertyChangeEvent) event.getTrigger();
display.asyncExec(new Runnable() {public void run() {
// Get the Wire definition and attempt to resolve a View ID from the TargetEntityIdWire def = pce.getWireDefinition();
if (def == null) {
return;
}
//we can use the SWTHelper, which is a part of the propertybroker.swt plug-in, to locate our view based on its idIViewPart view = SWTHelper.locateView(def.getTargetEntityId());
if (null != view){
SampleView.addSite(pce.getPropertyValue().getValue().toString());
}
}
});
}
return null;
}
When creating an action handler for a sidebar component, we need to explicitly find the target component, and then find the Eclipse view that we want to deal with the property, based on the view ID. Now the sidebar component is able to receive and process values that have been published to it.
Creating our application
Now that the sidebar component has been created and is ready to receive published properties, we can create the Composite Application.
1. Launch Lotus Notes 8.5 from Eclipse and create a blank composite application. Notice that the sample sidebar component is in the sidebar.
2. Select "Actions > Edit Application" to edit the blank composite application.
3. In the Composite Application Editor, add a Managed Browser component to the application.
4. Right-click the component in the navigator and select 'Wiring'.
5. In the wiring UI, notice that there is only one component visible. To wire to the sidebar component, click 'Include Default Sidebar Components' . The sidebar component should now display.
6. Disable strict type checking and create a wire between the "Current URL of browser changed" property of the browser to the Text action, then click OK.
7. Save the application and close the Composite Application Editor. Now that we have wired the browser to the sidebar component, every time a Web page is loaded it is added to the table in the sidebar component.
8. Edit the mail view using the Composite Application Editor. Open your mail view in Lotus Notes 8.5 and select "Actions > Edit Application".
9. Right-click the "Mail" page in the navigator and select "Wiring".
10. Click "Include Default Sidebar Components", create a wire from the "Subject Changed" property of the "Notes Mail View" component to the Text action, and click OK.
11. Save your changes and exit the Composite Application Editor.
Now when you select an email from your email view, the subject is added to the sidebar component. If you switch back to the browser composite application and enter a new address, the address is also added to the sidebar component. You can see that multiple composite applications can interact with a sidebar component, since it is not tied to any particular composite application.


