[MOBY-guts] biomoby commit

Paul Gordon gordonp at dev.open-bio.org
Thu May 13 17:52:50 UTC 2010


gordonp
Thu May 13 13:52:50 EDT 2010
Update of /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util
In directory dev.open-bio.org:/tmp/cvs-serv30041/src/main/ca/ucalgary/services/util

Modified Files:
	PBERecorder.java 
Log Message:
Added choice script missing from DOM-based Body tag HTML insert
moby-live/Java/src/main/ca/ucalgary/services/util PBERecorder.java,1.6,1.7
===================================================================
RCS file: /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/PBERecorder.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/PBERecorder.java	2010/05/13 15:56:37	1.6
+++ /home/repository/moby/moby-live/Java/src/main/ca/ucalgary/services/util/PBERecorder.java	2010/05/13 17:52:50	1.7
@@ -355,6 +355,7 @@
 
 	// datatype<->event unification for Seahawk->browser drag 'n' drop
 	String action = request.getParameter(DataRecorder.PASSTHROUGH_ACTION);
+	//System.err.println("Event sent to PBE via AJAX is "+action);
 	if(action.equals("pasteEvent")){
 	    dataPasted(request);
 	}
@@ -431,6 +432,7 @@
     private void setChoice(HttpServletRequest request){
 	String choiceString = request.getParameter(LIST_CHOICE_PARAM);
 	int choice;
+	//System.err.println("Set choice in PBERecorder to "+choiceString);
 	try{
 	    lastChoice = Integer.parseInt(choiceString);
 	} catch(Exception e){
@@ -438,7 +440,7 @@
 	    lastChoice = -1; //error
 	    return;
 	}
-	//setStatus("Choice being applied...");
+	setStatus("Choice being applied...");
     }
 
     public void setStatus(String statusMsg){
@@ -513,7 +515,7 @@
     }
 
     public Element[] getBodyAsDOM(HttpServletRequest request, Document owner){
-	Element[] bodyNodes = new Element[3];
+	Element[] bodyNodes = new Element[4];
 	bodyNodes[0] = owner.createElement("script");
 	bodyNodes[0].appendChild(owner.createTextNode(divScriptText));
 	bodyNodes[1] = owner.createElement("layer");
@@ -524,6 +526,12 @@
 	bodyNodes[2].setAttribute("type", "text/javascript");
 	// the following line is needed because browsers don't like empty script tags
 	bodyNodes[2].appendChild(owner.createTextNode(" "));
+
+	bodyNodes[3] = owner.createElement("script");
+	bodyNodes[3].setAttribute("src", request.getRequestURL()+choiceScriptURL);
+	bodyNodes[3].setAttribute("type", "text/javascript");
+	bodyNodes[3].appendChild(owner.createTextNode(" "));
+	
 	return bodyNodes;
     }
 




More information about the MOBY-guts mailing list