Index: /trunk/src/org/expeditee/actions/Actions.java
===================================================================
--- /trunk/src/org/expeditee/actions/Actions.java	(revision 312)
+++ /trunk/src/org/expeditee/actions/Actions.java	(revision 313)
@@ -7,4 +7,5 @@
 import java.lang.reflect.Modifier;
 import java.net.URL;
+import java.rmi.UnexpectedException;
 import java.util.ArrayList;
 import java.util.Collection;
@@ -506,9 +507,22 @@
 					params = new Object[paramCount];
 					String[] paramStrings = parameters.split("\\s+");
-					if (paramCount != paramStrings.length)
+					/**
+					 * Any extra parametres will be treated as the rest of the
+					 * string if the last param is a string
+					 */
+					if (paramCount > paramStrings.length)
 						continue;
-					for (int i = 0; i < paramCount; i++) {
-						SString nextParam = new SString(paramStrings[i]);
-						try {
+					/**
+					 * If there are extra parametres the last param must be a
+					 * String
+					 */
+					int lastParam = paramTypes.length - 1;
+
+					if (paramCount < paramStrings.length
+							&& !paramTypes[lastParam].equals(String.class))
+						continue;
+					try {
+						for (int i = 0; i < paramCount; i++) {
+							SString nextParam = new SString(paramStrings[i]);
 							params[i] = null;
 							if (paramTypes[i].equals(int.class)
@@ -531,10 +545,20 @@
 								params[i] = nextParam.stringValue();
 							} else {
-								continue;
+								throw new UnexpectedException(
+										"Unexpected type "
+												+ paramTypes[i].getClass()
+														.toString());
 							}
-						} catch (Exception e) {
-							continue;
 						}
+					} catch (Exception e) {
+						continue;
 					}
+					/** Append extra params on the end of the last string param */
+					String s = params[lastParam].toString();
+					for (int i = paramCount; i < paramStrings.length; i++) {
+						s += ' ' + paramStrings[i];
+					}
+					params[lastParam] = s;
+
 					con = c;
 					break;
@@ -861,8 +885,9 @@
 		try {
 			return PerformAction(current, launcher, command);
-		}catch (RuntimeException e) {
+		} catch (RuntimeException e) {
 			MessageBay.errorMessage("Action failed: " + e.getMessage());
 		} catch (Exception e) {
-			MessageBay.errorMessage("Action failed: " + e.getClass().getSimpleName());
+			MessageBay.errorMessage("Action failed: "
+					+ e.getClass().getSimpleName());
 		}
 		return null;
Index: /trunk/src/org/expeditee/actions/Simple.java
===================================================================
--- /trunk/src/org/expeditee/actions/Simple.java	(revision 312)
+++ /trunk/src/org/expeditee/actions/Simple.java	(revision 313)
@@ -933,7 +933,7 @@
 				// The fast search does not do replacement
 				if (bReplace) {
-					searchAgent = new SearchFrameset(null, firstFrame, maxFrame);
+					searchAgent = new SearchFrameset(firstFrame, maxFrame, null);
 				} else {
-					searchAgent = new SearchFramesetFast(null, firstFrame, maxFrame);
+					searchAgent = new SearchFramesetFast(firstFrame, maxFrame, null);
 				}
 				searchAgent.initialise(null, null, frameset, resultsFrameset,
Index: /trunk/src/org/expeditee/agents/DefaultAgent.java
===================================================================
--- /trunk/src/org/expeditee/agents/DefaultAgent.java	(revision 312)
+++ /trunk/src/org/expeditee/agents/DefaultAgent.java	(revision 313)
@@ -107,5 +107,5 @@
 
 	public boolean hasResultFrame() {
-		return _end != null;
+		return getResultFrame() != null;
 	}
 	
Index: /trunk/src/org/expeditee/agents/SearchFrameset.java
===================================================================
--- /trunk/src/org/expeditee/agents/SearchFrameset.java	(revision 312)
+++ /trunk/src/org/expeditee/agents/SearchFrameset.java	(revision 313)
@@ -8,12 +8,12 @@
 	private long _maxFrame = Integer.MAX_VALUE;
 	
-	public SearchFrameset(String searchText) {
-		super(searchText);
-	}
-	
-	public SearchFrameset(String searchText, long firstFrame, long maxFrame) {
+	public SearchFrameset(long firstFrame, long maxFrame, String searchText) {
 		this(searchText);
 		_firstFrame = firstFrame;
 		_maxFrame = maxFrame;
+	}
+	
+	public SearchFrameset(String searchText) {
+		super(searchText);
 	}
 
Index: /trunk/src/org/expeditee/agents/SearchFramesetFast.java
===================================================================
--- /trunk/src/org/expeditee/agents/SearchFramesetFast.java	(revision 312)
+++ /trunk/src/org/expeditee/agents/SearchFramesetFast.java	(revision 313)
@@ -12,12 +12,12 @@
 	private long _maxFrame = Integer.MAX_VALUE;
 
-	public SearchFramesetFast(String searchText) {
-		super(searchText);
-	}
-	
-	public SearchFramesetFast(String searchText, long firstFrame, long maxFrame) {
+	public SearchFramesetFast(long firstFrame, long maxFrame, String searchText) {
 		this(searchText);
 		_firstFrame = firstFrame;
 		_maxFrame = maxFrame;
+	}
+	
+	public SearchFramesetFast(String searchText) {
+		super(searchText);
 	}
 
Index: /trunk/src/org/expeditee/agents/SearchFramesetNoResults.java
===================================================================
--- /trunk/src/org/expeditee/agents/SearchFramesetNoResults.java	(revision 312)
+++ /trunk/src/org/expeditee/agents/SearchFramesetNoResults.java	(revision 313)
@@ -13,12 +13,12 @@
 	private Map<String, Collection<String>> _results = new HashMap<String, Collection<String>>();
 	
-	public SearchFramesetNoResults(String searchText) {
-		super(searchText);
-	}
-	
-	public SearchFramesetNoResults(String searchText, long firstFrame, long maxFrame) {
+	public SearchFramesetNoResults(long firstFrame, long maxFrame, String searchText) {
 		this(searchText);
 		_firstFrame = firstFrame;
 		_maxFrame = maxFrame;
+	}
+	
+	public SearchFramesetNoResults(String searchText) {
+		super(searchText);
 	}
 
Index: /trunk/src/org/expeditee/agents/SearchGreenstone.java
===================================================================
--- /trunk/src/org/expeditee/agents/SearchGreenstone.java	(revision 312)
+++ /trunk/src/org/expeditee/agents/SearchGreenstone.java	(revision 313)
@@ -1,7 +1,7 @@
 package org.expeditee.agents;
 
-import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
+import java.util.Map;
 import java.util.Vector;
 
@@ -12,11 +12,16 @@
 import org.expeditee.greenstone.ResultDocument;
 import org.expeditee.gui.AttributeValuePair;
+import org.expeditee.gui.DisplayIO;
 import org.expeditee.gui.Frame;
 import org.expeditee.gui.FrameCreator;
 import org.expeditee.gui.FrameGraphics;
+import org.expeditee.gui.FrameMouseActions;
+import org.expeditee.gui.MessageBay;
 import org.expeditee.items.Text;
 
 public class SearchGreenstone extends SearchAgent {
 
+	private static String _fullCaseSearchQuery = null;
+
 	private static boolean _doCasefolding = true;
 
@@ -27,4 +32,11 @@
 	private static String _maxResults = "10";
 
+	private static boolean _showAbstract = false;
+	private static boolean _showKeywords = false;
+	private static boolean _showAuthors = false;
+	private static boolean _showDate = false;
+
+	private String _thisMaxResults = "10";
+
 	private int _indexChoice = 1;
 
@@ -35,13 +47,41 @@
 	private static String[] _indexKeys = { "TX", "TI", "JO", "BO", "CR", "KE" };
 
-	protected static Vector<Result> _currentResultSet;
+	protected static Vector<Result> _currentResultSet = null;
+
+	private boolean _useLastSearchResults = false;
+
+	/**
+	 * dateMap is a hash table. The keys are year values. the data associated
+	 * with each key is a Vector of document IDs therefore, for the current
+	 * result set you can get the set of years in which the results were
+	 * published, and for each year you can get the set of documents published
+	 * in that year
+	 * 
+	 * If you want to introduce additional mappings (eg document written by
+	 * authors) you should introduce additional structures here (HashMap used in
+	 * the same way as dateMap will probably suffice
+	 * 
+	 */
+	protected static Map<String, Vector<String>> _dateMap = new HashMap<String, Vector<String>>();
+
+	protected static Map<Integer, Vector<String>> _pageCountMap = new HashMap<Integer, Vector<String>>();
+
+	protected static Map<String, String> _titleMap = new HashMap<String, String>();
+
+	public SearchGreenstone(int resultsCount, String searchText) {
+		super(searchText);
+		_thisMaxResults = resultsCount + "";
+		_fullCaseSearchQuery = searchText;
+	}
 
 	public SearchGreenstone(String searchText) {
 		super(searchText);
-	}
-
-	public SearchGreenstone(int resultsCount, String searchText) {
-		this(searchText);
-		_maxResults = resultsCount + "";
+		_thisMaxResults = _maxResults;
+		_fullCaseSearchQuery = searchText;
+	}
+
+	public SearchGreenstone() {
+		super(null);
+		_useLastSearchResults = true;
 	}
 
@@ -61,8 +101,8 @@
 			if (attribute.equals("campus"))
 				_locationChoice = 0;
-			if (attribute.equals("autoconnect"))
+			else if (attribute.equals("autoconnect"))
 				connect();
 
-			if (attribute.equals("maxresults")) {
+			else if (attribute.equals("maxresults")) {
 				try {
 					_maxResults = avp.getValue();
@@ -71,6 +111,14 @@
 			}
 
-			if (attribute.equals("dostemming"))
+			else if (attribute.equals("dostemming"))
 				_doStemming = true;
+			else if (attribute.startsWith("showabstract"))
+				_showAbstract = true;
+			else if (attribute.startsWith("showauthor"))
+				_showAuthors = true;
+			else if (attribute.startsWith("showkeyword"))
+				_showKeywords = true;
+			else if (attribute.startsWith("showdate"))
+				_showDate = true;
 		}
 	}
@@ -83,17 +131,32 @@
 	@Override
 	protected Frame process(Frame frame) {
-		_results.setTitle("SearchGreenstone [" + _pattern + "]");
-
-		connect();
-
-		doQuery(_pattern);
+		String resultsTitle = this.getClass().getSimpleName() + "["
+				+ _fullCaseSearchQuery + "]";
+		_results.setTitle(resultsTitle);
+
+		if (!_useLastSearchResults) {
+			connect();
+			doQuery(_pattern);
+		} else if (_currentResultSet != null) {
+			Text newText = DisplayIO.getCurrentFrame().createNewText(
+					_fullCaseSearchQuery);
+			_clicked = newText;
+			FrameMouseActions.pickup(newText);
+		}
+
+		if (_currentResultSet == null) {
+			MessageBay.errorMessage("Could not find Greenstone query text");
+			return null;
+		}
 
 		createResults();
-		
+
 		_results.save();
 
 		String resultFrameName = _results.getName();
-		if (_clicked != null)
+		if (_clicked != null) {
 			_clicked.setLink(resultFrameName);
+			_clicked.setText(resultsTitle);
+		}
 
 		return _results.getFirstFrame();
@@ -104,5 +167,14 @@
 	}
 
+	/**
+	 * TODO make this more efficient so the maps are loaded on demand...
+	 * 
+	 * @param queryText
+	 */
 	protected void doQuery(String queryText) {
+		_pageCountMap.clear();
+		_dateMap.clear();
+		_titleMap.clear();
+
 		Query query = createQuery(queryText);
 		QueryOutcome queryOutcome = _gsdl.issueQueryToServer(query);
@@ -113,10 +185,8 @@
 
 		Query query = new Query();
-
 		// set the query options
 		query.setQueryText(queryText);
-
 		query.setIndex(_indexKeys[_indexChoice]);
-		query.setMaxDocsToReturn(_maxResults);
+		query.setMaxDocsToReturn(_thisMaxResults);
 
 		if (_doStemming) {
@@ -138,6 +208,5 @@
 
 		Vector<Result> results = queryOutcome.getResults();
-		for (Enumeration<Result> e = results.elements(); e.hasMoreElements();) {
-			Result result = e.nextElement();
+		for (Result result : results) {
 			getResultMetadata(result);
 		}
@@ -193,12 +262,6 @@
 			ResultDocument rd = _gsdl.getDocument(docID);
 			int docRank = result.getRank();
-			// Put the details on a separate frame
-			FrameCreator details = new FrameCreator(rd.getTitle());
-			details.addText(getDetails(rd), null, null, null, true);
-
-			resultsCreator.addText((docRank + 1) + ". " + rd.getTitle(), null,
-					details.getName(), "getTextFromChildFrame", false);
-
-			FrameGraphics.requestRefresh(true);
+
+			addText(rd, resultsCreator, (docRank + 1) + ". " + rd.getTitle());
 		}
 	}
@@ -252,3 +315,34 @@
 	}
 
+	@Override
+	public Frame getResultFrame() {
+		if (_useLastSearchResults && _currentResultSet == null)
+			return null;
+
+		return super.getResultFrame();
+	}
+
+	protected void addText(ResultDocument rd, FrameCreator results, String text) {
+		// Put the details on a separate frame
+		FrameCreator details = new FrameCreator(rd.getTitle());
+		details.addText(getDetails(rd), null, null, null, true);
+
+		if (_showDate && rd.metadataExists("Date"))
+			text += ", " + rd.getDate();
+		
+		if (_showAbstract && rd.metadataExists("Abstract"))
+			text += "\n  " + rd.getAbstract();
+		
+		if (_showAuthors && rd.metadataExists("Creator"))
+			text += "\nAuthors" + rd.getAuthors().toString();
+		
+		if (_showKeywords && rd.getKeywords().size() > 0)
+			text += "\nKeywords" + rd.getKeywords().toString();
+
+		results.addText(text, null, details.getName(), "getTextFromChildFrame",
+				false);
+
+		FrameGraphics.requestRefresh(true);
+	}
+
 }
Index: /trunk/src/org/expeditee/agents/SearchGreenstoneByDate.java
===================================================================
--- /trunk/src/org/expeditee/agents/SearchGreenstoneByDate.java	(revision 312)
+++ /trunk/src/org/expeditee/agents/SearchGreenstoneByDate.java	(revision 313)
@@ -2,5 +2,5 @@
 
 import java.util.Collections;
-import java.util.HashMap;
+import java.util.Map;
 import java.util.Vector;
 
@@ -12,35 +12,20 @@
 public class SearchGreenstoneByDate extends SearchGreenstone {
 
+	public SearchGreenstoneByDate(int resultsCount, String searchText) {
+		super(resultsCount, searchText);
+	}
+	
 	public SearchGreenstoneByDate(String searchText) {
 		super(searchText);
 	}
-
-	public SearchGreenstoneByDate(int resultsCount, String searchText) {
-		super(resultsCount, searchText);
-	}
-
-	/**
-	 * dateMap is a hash table. The keys are year values. the data associated
-	 * with each key is a Vector of document IDs therefore, for the current
-	 * result set you can get the set of years in which the results were
-	 * published, and for each year you can get the set of documents published
-	 * in that year
-	 * 
-	 * If you want to introduce additional mappings (eg document written by
-	 * authors) you should introduce additional structures here (HashMap used in
-	 * the same way as dateMap will probably suffice
-	 * 
-	 */
-	private static HashMap<String, Vector<String>> _dateMap = new HashMap<String, Vector<String>>();
-
-	protected void doQuery(String queryText) {
-		_dateMap.clear();
-
-		super.doQuery(queryText);
-
-		initialiseDateMap(_currentResultSet);
+	
+	public SearchGreenstoneByDate() {
+		super();
 	}
 
 	protected void createResults() {
+		if(_dateMap.isEmpty()){
+			initialiseDateMap(_currentResultSet);
+		}
 		viewByDate(_dateMap, _results);
 	}
@@ -83,5 +68,5 @@
 	 * output
 	 */
-	private void viewByDate(HashMap<String, Vector<String>> dateMap,
+	private void viewByDate(Map<String, Vector<String>> dateMap,
 			FrameCreator results) {
 		Vector<String> theDates = new Vector<String>(dateMap.keySet());
@@ -96,13 +81,5 @@
 			for (String docID : ids) {
 				ResultDocument rd = _gsdl.getDocument(docID);
-
-				// Put the details on a separate frame
-				FrameCreator details = new FrameCreator(rd.getTitle());
-				details.addText(getDetails(rd), null, null, null, true);
-
-				results.addText(date + "- " + rd.getTitle(), null, details
-						.getName(), "getTextFromChildFrame", false);
-
-				FrameGraphics.requestRefresh(true);
+				addText(rd, results, date + "- " + rd.getTitle());
 			}
 		}
Index: /trunk/src/org/expeditee/agents/SearchGreenstoneByPages.java
===================================================================
--- /trunk/src/org/expeditee/agents/SearchGreenstoneByPages.java	(revision 313)
+++ /trunk/src/org/expeditee/agents/SearchGreenstoneByPages.java	(revision 313)
@@ -0,0 +1,99 @@
+package org.expeditee.agents;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.Vector;
+
+import org.expeditee.greenstone.Result;
+import org.expeditee.greenstone.ResultDocument;
+import org.expeditee.gui.FrameCreator;
+import org.expeditee.gui.FrameGraphics;
+
+public class SearchGreenstoneByPages extends SearchGreenstone {
+
+	public SearchGreenstoneByPages(int resultsCount, String searchText) {
+		super(resultsCount, searchText);
+	}
+	
+	public SearchGreenstoneByPages(String searchText) {
+		super(searchText);
+	}
+	
+	public SearchGreenstoneByPages() {
+		super();
+	}
+
+	protected void createResults() {
+		if (_pageCountMap.isEmpty()) {
+			initialisePageCountMap(_currentResultSet);
+		}
+		viewByPageCount(_pageCountMap, _results);
+	}
+
+	public void initialisePageCountMap(Vector<Result> results) {
+		for (Result result : results) {
+			String docID = result.getDocID();
+
+			ResultDocument rd = _gsdl.getDocument(docID);
+
+			if (rd.metadataExists("Pages")) {
+				addToPageCountMap(docID, rd);
+			}
+		}
+	}
+
+	public void addToPageCountMap(String docID, ResultDocument rd) {
+		int pages = 1;
+		String[] pageRange = rd.getPages().trim().split("-");
+
+		if (pageRange.length == 2) {
+			try {
+				pages = Integer.parseInt(pageRange[1])
+						- Integer.parseInt(pageRange[0]) + 1;
+			} catch (Exception e) {
+				return;
+			}
+		}
+
+		if (_pageCountMap.containsKey(pages)) {
+			Vector<String> dateVector = _pageCountMap.get(pages);
+			if (!dateVector.contains(docID)) {
+				dateVector.addElement(docID);
+			}
+		} else {
+			Vector<String> dateVector = new Vector<String>();
+			dateVector.addElement(docID);
+			_pageCountMap.put(pages, dateVector);
+		}
+	}
+
+	/**
+	 * This method provides an alternative view of the result set It uses the
+	 * dateMap which organises results according to the year in which they were
+	 * published
+	 * 
+	 * You will need to write a similar method for any additional view that you
+	 * implement
+	 * 
+	 * You may wish to modify this method to provide a better layout of the
+	 * output
+	 */
+	private void viewByPageCount(Map<Integer, Vector<String>> pageCountMap,
+			FrameCreator results) {
+		Vector<Integer> thePageCounts = new Vector<Integer>(pageCountMap
+				.keySet());
+		Collections.sort(thePageCounts);
+
+		for (Integer pageCount : thePageCounts) {
+			Vector<String> ids = pageCountMap.get(pageCount);
+
+			// Text dateText = results.addText(date, null, null, null, false);
+			// dateText.setFontStyle("bold");
+
+			for (String docID : ids) {
+				ResultDocument rd = _gsdl.getDocument(docID);
+				addText(rd, results, pageCount + "- " + rd.getTitle());
+			}
+		}
+	}
+}
Index: /trunk/src/org/expeditee/agents/SearchGreenstoneByTitle.java
===================================================================
--- /trunk/src/org/expeditee/agents/SearchGreenstoneByTitle.java	(revision 313)
+++ /trunk/src/org/expeditee/agents/SearchGreenstoneByTitle.java	(revision 313)
@@ -0,0 +1,69 @@
+package org.expeditee.agents;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.Vector;
+
+import org.expeditee.greenstone.Result;
+import org.expeditee.greenstone.ResultDocument;
+import org.expeditee.gui.FrameCreator;
+import org.expeditee.gui.FrameGraphics;
+
+public class SearchGreenstoneByTitle extends SearchGreenstone {
+
+	public SearchGreenstoneByTitle(int resultsCount, String searchText) {
+		super(resultsCount, searchText);
+	}
+	
+	public SearchGreenstoneByTitle(String searchText) {
+		super(searchText);
+	}
+	
+	public SearchGreenstoneByTitle() {
+		super();
+	}
+
+	protected void createResults() {
+		if (_titleMap.isEmpty()) {
+			initialiseTitleMap(_currentResultSet);
+		}
+		viewByTitle(_titleMap, _results);
+	}
+
+	public void initialiseTitleMap(Vector<Result> results) {
+		for (Result result : results) {
+			String docID = result.getDocID();
+
+			ResultDocument rd = _gsdl.getDocument(docID);
+
+			if (rd.metadataExists("Title")) {
+				_titleMap.put(rd.getTitle(), docID);
+			}
+		}
+	}
+
+	/**
+	 * This method provides an alternative view of the result set It uses the
+	 * dateMap which organises results according to the year in which they were
+	 * published
+	 * 
+	 * You will need to write a similar method for any additional view that you
+	 * implement
+	 * 
+	 * You may wish to modify this method to provide a better layout of the
+	 * output
+	 */
+	private void viewByTitle(Map<String, String> titleMap,
+			FrameCreator results) {
+		Vector<String> theTitles = new Vector<String>(titleMap.keySet());
+		Collections.sort(theTitles);
+
+		for (String title : theTitles) {
+			String id = titleMap.get(title);
+
+			ResultDocument rd = _gsdl.getDocument(id);
+
+			addText(rd, results, rd.getTitle());
+		}
+	}
+}
Index: /trunk/src/org/expeditee/greenstone/Greenstone3Connection.java
===================================================================
--- /trunk/src/org/expeditee/greenstone/Greenstone3Connection.java	(revision 312)
+++ /trunk/src/org/expeditee/greenstone/Greenstone3Connection.java	(revision 313)
@@ -426,4 +426,5 @@
 		InputSource is = new InputSource(sr);
 		DOMParser p = new DOMParser();
+
 		try {
 			p.parse(is);
Index: /trunk/src/org/expeditee/greenstone/ResultDocument.java
===================================================================
--- /trunk/src/org/expeditee/greenstone/ResultDocument.java	(revision 312)
+++ /trunk/src/org/expeditee/greenstone/ResultDocument.java	(revision 313)
@@ -110,5 +110,5 @@
 
 	public void setTitle(String title) {
-		this.title = new String(title);
+		this.title = removeHTML(title);
 		this.retrievedMetadata.add("Title");
 	}
@@ -226,4 +226,9 @@
 		return this.retrievedMetadata.contains(metadataTag);
 	}
+	
+
+	protected String removeHTML(String s){
+		return s.replaceAll("&quot;", "\"");
+	}
 
 }
Index: /trunk/src/org/expeditee/items/widgets/DataFrameWidget.java
===================================================================
--- /trunk/src/org/expeditee/items/widgets/DataFrameWidget.java	(revision 312)
+++ /trunk/src/org/expeditee/items/widgets/DataFrameWidget.java	(revision 313)
@@ -54,10 +54,12 @@
 				addSubject(_dataFrame);
 			} else {
-				// If the dataFrame has not been saved yet because it has just
-				// been
-				// created via TDFC this chart needs to be marked as changed so
-				// it will
-				// be refreshed when the user goes back
-				update();
+				/**
+				 * If the dataFrame has not been saved yet because it has just
+				 * been created via TDFC this widget needs to be marked as
+				 * changed so it will be refreshed when the user goes back
+				 */
+				assert(false);
+				//_needsUpdating = true;
+				// update();
 			}
 		}
@@ -98,8 +100,8 @@
 	public void update() {
 		Frame parent = getParentFrame();
-		if(parent != null && parent == DisplayIO.getCurrentFrame()){
+		if (parent != null && parent == DisplayIO.getCurrentFrame()) {
 			refresh();
 		}
-		
+
 		_needsUpdating = true;
 	}
@@ -115,5 +117,9 @@
 		clearSubjects();
 		setDataFrame(null);
-		refresh();
+		if (oldLink == null) {
+			_needsUpdating = true;
+		} else {
+			refresh();
+		}
 	}
 
@@ -141,5 +147,5 @@
 	protected void paintInFreeSpace(Graphics g) {
 		super.paintInFreeSpace(g);
-		g.setFont(((Text)getSource()).getFont());
+		g.setFont(((Text) getSource()).getFont());
 		g.setColor(Color.WHITE);
 		g.drawString(this.getClass().getSimpleName(), getX() + 10, getY() + 20);
Index: /trunk/src/org/expeditee/items/widgets/DataFrameWidget1.java
===================================================================
--- /trunk/src/org/expeditee/items/widgets/DataFrameWidget1.java	(revision 312)
+++ /trunk/src/org/expeditee/items/widgets/DataFrameWidget1.java	(revision 313)
@@ -25,15 +25,16 @@
 		return stateArgs;
 	}
-	
+
 	@Override
 	public void refresh() {
 		super.refresh();
 		Frame frame = getDataFrame();
-		if(frame != null) {
+		if (frame != null) {
 			_combo.removeAllItems();
-			for(Text text: frame.getBodyTextItems(false)) {
+			for (Text text : frame.getBodyTextItems(false)) {
 				_combo.addItem(text.getText());
 			}
-			_combo.setSelectedIndex(0);
+			if (_combo.getItemCount() > 0)
+				_combo.setSelectedIndex(0);
 		}
 	}
