Index: /MDService2/trunk/MDService2/WebContent/scripts/mdservice2_ui.js
===================================================================
--- /MDService2/trunk/MDService2/WebContent/scripts/mdservice2_ui.js	(revision 1007)
+++ /MDService2/trunk/MDService2/WebContent/scripts/mdservice2_ui.js	(revision 1008)
@@ -699,4 +699,5 @@
 	/*
 	 * deactivated -> obsolete?
+	 * 
 	$('#terms .cmd_detail').live('click',  function(event) {
 		//showTermDetail($(this).parent().text());			
@@ -712,6 +713,5 @@
 		
 	});
-*/
-	
+	*/
 }
 function loadComponentsRegistry(){
@@ -1055,5 +1055,6 @@
 	});
 	
-	$('.result .cmd_detail').live('click',  function(event) {				
+	$('.result .cmd_detail').live('click',  function(event) {	
+	
 		var uri = $(this).parent().find("a").attr('href'); // + " body";
 		$.get(uri, showDetail,'html');
@@ -1084,10 +1085,26 @@
 	});
 
+	
 	$('#querylist .cmd_save').live('click',  function(event) {
-		var qid = $(this).closest('.query_wrapper').attr("id");
-		var qstring = queryset.getquerystring(qid);	
-		var json_coll = queryset.getcollections(qid);
-		var json_cols = queryset.getcolumns(qid);
-		var squery = queryset.getsquery(qid);
+		
+		var qid = "";
+		var qstring = "";	
+		var json_coll = "null";
+		var json_cols = "null";
+		var squery = "";
+		var bookmark = "0";
+		
+		if ($(this).parents('.result').length > 0){
+			qstring = $(this).parent().find("a").attr('href');
+			qstring = qstring.substring(18,qstring.length);
+			bookmark = "1";
+		} else {
+			qid = $(this).closest('.query_wrapper').attr("id");
+			qstring = queryset.getquerystring(qid);	
+			json_coll = queryset.getcollections(qid);
+			json_cols = queryset.getcolumns(qid);
+			squery = queryset.getsquery(qid);
+		}
+		 
 		// JSON conversion
 		if (qstring.length == 0){
@@ -1104,6 +1121,14 @@
 			jsonw["WorkspaceProfile"]["Querysets"][id]["Queries"] = [{}];
 		}
-		var jsonq = {"name":"", "squerystring":squery, "querystring":qstring,"searchclauses":"null" , "collections" : json_coll, "columns" : json_cols};
-		var name = Query.fullformatstring(jsonq);
+		var jsonq = {"name":"", "squerystring":squery, "querystring":qstring,"searchclauses":"null" , "collections" : json_coll, "columns" : json_cols, "bookmark" : bookmark};
+		
+		var name;
+		if (bookmark == "1") {
+			qstring = Url.decode(qstring);
+			var s = qstring.split(':');
+			name = s[s.length - 2] + ":" + s[s.length - 1];
+		} else {
+			name = Query.fullformatstring(jsonq);
+		}
 		jsonq.name = name;
 		
@@ -1159,6 +1184,5 @@
 		
 	});
-	
-	
+		
 	
 	$('.cmd_down').live('click',  function(event) {	
@@ -1266,46 +1290,21 @@
 	});
 	$('#serverqueries .cmd_load').live('click',function(event){
-		hideWelcomeMessage();
+		
 		var id = parseInt( $("#serverqts_select option:selected").val());
 		var str = $(this).parent().find('a').attr("href");
 		var iq = parseInt(str.substring(9));
 		var json = jQuery.parseJSON($("#serverqs").attr("data"));
-		var query = new Query([],"","","");
-		query.load(json["WorkspaceProfile"]["Querysets"][id]["Queries"][iq]);
-		query.repository = getSelectedRepository();
-		queryset.addquery(query);
-		
-		searchclauseset.sctext = query.query;
-		notifyUser(searchclauseset.sctext,'debug');
-		searchclauseset.buildfromquerystring();
-
-		collections = query.collection;
-		//$('#collection_list').attr("value",query.getcollectiontext("name"));
-		collections_widget.load(query.collection);
-		//$('#columns_list').attr("value",query.columns);
-		columns_widget.load(query.columns.split(','));
-		$('#input-simplequery').attr("value",query.squery);
+		var q = json["WorkspaceProfile"]["Querysets"][id]["Queries"][iq];
+		
+		loadQuery(q);
 	});
 	$('#userqueries .cmd_load').live('click',function(event){
-		hideWelcomeMessage();
+		
 		var id = parseInt( $("#qts_select option:selected").val());
 		var str = $(this).parent().find('a').attr("href");
 		var iq = parseInt(str.substring(7));
-		
-		var query = new Query([],"","","");
-		query.load(jsonw["WorkspaceProfile"]["Querysets"][id]["Queries"][iq]);
-		query.repository = getSelectedRepository();
-		queryset.addquery(query);
-		
-		searchclauseset.sctext = query.query;
-		notifyUser(searchclauseset.sctext,'debug');
-		searchclauseset.buildfromquerystring();
-
-		collections = query.collection;
-		//$('#collection_list').attr("value",query.getcollectiontext("name"));
-		collections_widget.load(query.collection);
-		//$('#columns_list').attr("value",query.columns);
-		columns_widget.load(query.columns.split(','));
-		$('#input-simplequery').attr("value",query.squery);
+		var q = jsonw["WorkspaceProfile"]["Querysets"][id]["Queries"][iq];
+		
+		loadQuery(q);
 	});
 	$('#userqueries .cmd_del').live('click', function(event){
@@ -1373,4 +1372,26 @@
 
 	
+
+}
+function loadQuery(q){
+	if (q["bookmark"] == "1") {
+		var uri = "http://localhost:8080/MDService2/record/htmldetail/" + q["querystring"];
+		$.get(uri, showDetail,'html');
+	} else {
+		hideWelcomeMessage();
+		var query = new Query([],"","","");
+		query.load(q);
+		query.repository = getSelectedRepository();
+		queryset.addquery(query);
+		
+		searchclauseset.sctext = query.query;
+		notifyUser(searchclauseset.sctext,'debug');
+		searchclauseset.buildfromquerystring();
+
+		collections = query.collection;
+		collections_widget.load(query.collection);
+		columns_widget.load(query.columns.split(','));
+		$('#input-simplequery').attr("value",query.squery);
+	} 
 
 }
Index: /MDService2/trunk/MDService2/WebContent/scripts/mdservice_model.js
===================================================================
--- /MDService2/trunk/MDService2/WebContent/scripts/mdservice_model.js	(revision 1007)
+++ /MDService2/trunk/MDService2/WebContent/scripts/mdservice_model.js	(revision 1008)
@@ -215,4 +215,6 @@
 		return "";
 	}
+	querystring = Url.decode(querystring);
+	
 	var arr_and = querystring.split(" and ");
 	var simple_form = "";
Index: /MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/Admin.java
===================================================================
--- /MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/Admin.java	(revision 1007)
+++ /MDService2/trunk/MDService2/src/eu/clarin/cmdi/mdservice/action/Admin.java	(revision 1008)
@@ -37,5 +37,5 @@
 	private static String config_path = "mdservice.properties";
 	private static Properties  config;
-	public  static Logger log = Logger.getLogger("Admin.class");
+	public static Logger log = Logger.getLogger("Admin.class");
 	
 	public static String FATAL = "fatal";
@@ -233,4 +233,5 @@
 	}
 	public static void notifyUser(String msg, String type ) {
+		//Logger log = Logger.getLogger("Admin.class");
 		if (type.equals(Admin.FATAL)) {
 			log.fatal(msg);
Index: /MDService2/trunk/MDService2/src/log4j.xml
===================================================================
--- /MDService2/trunk/MDService2/src/log4j.xml	(revision 1007)
+++ /MDService2/trunk/MDService2/src/log4j.xml	(revision 1008)
@@ -8,5 +8,5 @@
           <!--  <param name="ConversionPattern" value="%d %-5p %c.%M:%L - %m%n"/>-->
           <!--  <param name="ConversionPattern" value="[%5p] %d{mm:ss} (%F:%M:%L)%n%m%n%n"/> -->
-          <param name="ConversionPattern" value="[%5p] %d{yyyy-MM-dd hh:mm:ss} : %m%n"/>
+          <param name="ConversionPattern" value="[%5p] %c.%M %d{yyyy-MM-dd hh:mm:ss} : %m%n"/>
           <!--  -->
        </layout> 
Index: /MDService2/trunk/MDService2/src/xsl/mdset2view.xsl
===================================================================
--- /MDService2/trunk/MDService2/src/xsl/mdset2view.xsl	(revision 1007)
+++ /MDService2/trunk/MDService2/src/xsl/mdset2view.xsl	(revision 1008)
@@ -183,5 +183,5 @@
 				</a>
 				<span class="cmd cmd_detail" ></span>				
-						
+				<span class="cmd cmd_save" ></span>						
 				</xsl:when>
 				<xsl:otherwise><xsl:value-of select="position()" /></xsl:otherwise>
