Two new Composite Application Wiki articles have been posted

You can check out the new articles on the wiki home page.

Local Composite Applications (.ca files)

Out of the box window properties and actions

Tags: : : :

R8 Sidebar ideas

I find it interesting that more and more people are using LinkedIn for discussions about topics relevant to a particular group. This posting is a discussion about ideas around the Notes 8 sidebar and its use.

This particular group is the Lotus Notes/Domino Technologies group and you can post different topics of interest and be emailed when topics or responses have been posted by others.

Obama’s Loss Traced To bob balfe

A colleague sent me this video. I then sent knock-off's just like it to many of my friends. It has gotten such great laughs I just had to share.

http://s3.moveon.org/swf/embed.swf

Dear Elliot

I just saw this video on Oprah – yes, I occasionally watch Oprah. It is people like this that are the real heroes in this world. You would never guess why it is called 99 Balloons until you watch the video.

Very inspirational.

“New” toolbar in Notes 8.5 supports web URL’s also!

Just as Alan showed how you can use the “New” toolbar to have any document added to that drop down you can also use it for any bookmark.

For instance, I have my blog entry in that list so I can do a single click to add an entry to my blog – which is strictly web based. The “Open” list is a supported drop target for any URL – from Internet Explorer or FireFox. So when you click on the button entry it launches the web browser to that URL.

The only issue I have is the button is only updated at the start of Notes so you will have to restart Notes if you add them like Alan showed.

Full circle implementation of the part property bridge idea

The last posting on this subject showed you how you can publish properties to other components using only Eclipse level API's. I got a few inquiries on how the Eclipse view part can receive property changes from other components.

Here is the complete round trip implementation. The view can receive property changes from the bridge using a part property listener – check out the code below. When the bridge needs to tell the eclipse part a property is changed it simple calls setPartProperty() which is part of the IWorkbenchPart3 interface. So this means your code only needs to register itself as a part property listener and process the changes as they come in.

So in short, to publish a property your part would call:

firePartPropertyChanged(propertyName.getText(), oldValue, propertyValue.getText());

To receive a property from another part you would implement a listener to yourself:

addPartPropertyListener(this);

public void propertyChange(PropertyChangeEvent arg0) {

int idx = getItemIndex(arg0.getProperty());

if (idx == -1){
propertyName.add(arg0.getProperty());
idx = getItemIndex(arg0.getProperty());
}

propertyName.select(idx);

propertyValue.setText(arg0.getNewValue() != null ? arg0.getNewValue().toString() : “”);
}

Here is the full source:

package net.balfes.partprop.bridge.views;

import org.eclipse.jface.util.IPropertyChangeListener;import org.eclipse.jface.util.PropertyChangeEvent;import org.eclipse.swt.widgets.Button;import org.eclipse.swt.widgets.Combo;import org.eclipse.swt.widgets.Composite;import org.eclipse.swt.widgets.Label;import org.eclipse.swt.widgets.Text;import org.eclipse.ui.part.*;import org.eclipse.swt.events.SelectionEvent;import org.eclipse.swt.events.SelectionListener;import org.eclipse.swt.layout.RowData;import org.eclipse.swt.layout.RowLayout;import org.eclipse.swt.SWT;

public class PropertyBridgeTest extends ViewPart implements IPropertyChangeListener {

	Combo propertyName = null;	Text propertyValue = null;	String oldValue = new String();

	public PropertyBridgeTest() {	}

	public void createPartControl(Composite parent) {

		RowLayout rl = new RowLayout(SWT.VERTICAL);

		parent.setLayout(rl);

		Label l = new Label(parent, SWT.NONE);		l.setText("Enter property name");

		RowData rd = new RowData();		rd.width = 300;

		propertyName = new Combo(parent, SWT.READ_ONLY);		propertyName.setLayoutData(rd);

		l = new Label(parent, SWT.NONE);		l.setText("Enter property value");

		propertyValue = new Text(parent, SWT.NONE);		propertyValue.setLayoutData(rd);

		Button b = new Button(parent, SWT.PUSH);		b.setText("Publish");

		b.addSelectionListener(new SelectionListener(){

			public void widgetDefaultSelected(SelectionEvent arg0) {

			}

			public void widgetSelected(SelectionEvent arg0) {				firePartPropertyChanged(propertyName.getText(), oldValue, propertyValue.getText());

				oldValue = propertyValue.getText();			}

		});

		addPartPropertyListener(this);

		//Setup what properties are in our view		createPartProperties();			}

	private void createPartProperties() {		this.setPartProperty("Name", "Bob Balfe");		this.setPartProperty("Phone", "555-543-1212");		this.setPartProperty("Manager", "George Bush");		this.setPartProperty("Computer", "Lenovo");	}

	public void setFocus() {			}

	int getItemIndex(String name){		String[] vals = propertyName.getItems();

		for (int x=0; x<vals.length; x++)			if (vals[x].equals(name))				return x;

		return -1;	}	public void propertyChange(PropertyChangeEvent arg0) {		int idx = getItemIndex(arg0.getProperty());

		if (idx == -1){			propertyName.add(arg0.getProperty());			idx = getItemIndex(arg0.getProperty());		}

		propertyName.select(idx);

		propertyValue.setText(arg0.getNewValue() != null ? arg0.getNewValue().toString() : "");	}

}

Using the built in navigators in your composite applications

There was an article posted by Greg Roberts, a developer on the composite applications team, a couple of days ago.

These new application page navigators can be used to navigate your multi-page composites.

Check it out: Using the built in navigators in your composite applications