Changeset 3491
- Timestamp:
- 2002-10-25T16:33:34+13:00 (22 years ago)
- Location:
- trunk/gsdl3/src/java/org/greenstone/gsdl3/action
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/AppletAction.java
r3467 r3491 38 38 HashMap params = GSXML.extractParams(cgi_paramList); 39 39 40 String collection = (String)params.get("c ");41 String service_name=(String)params.get("s n");40 String collection = (String)params.get("collection"); 41 String service_name=(String)params.get("serviceName"); 42 42 service_name+= "Applet"; 43 43 -
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/BrowseAction.java
r3467 r3491 52 52 HashMap params = GSXML.extractParams(cgi_paramList); 53 53 54 String collection = (String)params.get("c ");54 String collection = (String)params.get("collection"); 55 55 if (collection == null || collection.equals("")) { 56 56 return GSHTML.errorPage("classifierbrowse, need to specify a collection!"); … … 83 83 84 84 // if there is a cl field in the cgi params, get the classifier info 85 String node = (String)params.get("cl ");85 String node = (String)params.get("classifier"); 86 86 87 87 if (node==null|| node.equals("")) { -
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/PageAction.java
r3467 r3491 94 94 protected String aboutPage(Element page, Element request) { 95 95 96 // get the params out 97 HashMap params = GSXML.extractParams((Element)GSXML.getNodeByPath(request, "paramList")); 98 String coll_name = (String)params.get("c"); 96 // extract the params from the cgi-request, 97 // first convert short to long names 98 Element cgi_paramList = (Element)GSXML.getChildByTagName(request, "paramList"); 99 cgi_.toLong(cgi_paramList); 100 HashMap params = GSXML.extractParams(cgi_paramList); 101 102 String coll_name = (String)params.get("collection"); 99 103 if (coll_name == null || coll_name.equals("")) { 100 coll_name = (String)params.get("s c"); // cluster name104 coll_name = (String)params.get("serviceCluster"); // cluster name 101 105 } 102 106 if (coll_name == null || coll_name.equals("")) { -
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/QueryAction.java
r3467 r3491 63 63 HashMap params = GSXML.extractParams(cgi_paramList); 64 64 65 String collection = (String)params.get("c ");65 String collection = (String)params.get("collection"); 66 66 if (collection == null || collection.equals("")) { 67 67 return GSHTML.errorPage("textquery, need to specify a colleciton!"); … … 94 94 else { 95 95 System.out.println("pl name is "+pl.getNodeName()); 96 } 97 Element imported_paramList = (Element)doc_.importNode(pl, true); 98 // convert the name to short 99 cgi_.addShortNames(imported_paramList); 100 101 description.appendChild(imported_paramList); 102 103 // for each param in page_request, set the current value if present 104 //actually, prob dont need to know the default value, just which one to display - overwrite the default att? 105 106 Element param = (Element)imported_paramList.getFirstChild(); 107 while (param !=null) { 108 if (param.getNodeName().equals("param")) { // just in case 109 String name = param.getAttribute("name"); 110 String current = (String)params.get(name); 111 if (current !=null && !current.equals("")) { 112 param.setAttribute("default", current); 96 97 Element imported_paramList = (Element)doc_.importNode(pl, true); 98 // convert the name to short 99 cgi_.addShortNames(imported_paramList); 100 101 description.appendChild(imported_paramList); 102 103 // for each param in page_request, set the current value if present 104 //actually, prob dont need to know the default value, just which one to display - overwrite the default att? 105 106 Element param = (Element)imported_paramList.getFirstChild(); 107 while (param !=null) { 108 if (param.getNodeName().equals("param")) { // just in case 109 String name = param.getAttribute("name"); 110 String current = (String)params.get(name); 111 if (current !=null && !current.equals("")) { 112 param.setAttribute("default", current); 113 } 113 114 } 115 param = (Element)param.getNextSibling(); 114 116 } 115 param = (Element)param.getNextSibling(); 116 } 117 117 } 118 118 cgi_request.appendChild(description); 119 119 120 120 // check the query string 121 String query = (String)params.get("q ");121 String query = (String)params.get("query"); 122 122 123 123 if (query==null|| query.equals("")) { -
trunk/gsdl3/src/java/org/greenstone/gsdl3/action/ResourceAction.java
r3467 r3491 33 33 HashMap params = GSXML.extractParams(cgi_paramList); 34 34 35 String resource_name = (String)params.get("r ");35 String resource_name = (String)params.get("resource"); 36 36 if (resource_name == null || resource_name.equals("")) { 37 37 // no doc to show … … 56 56 mr_request.setAttribute("type", "query"); 57 57 mr_request.setAttribute("resourceType", "core"); 58 String to = (String)params.get("c "); // collection name58 String to = (String)params.get("collection"); // collection name 59 59 to = GSPath.appendLink(to, "ResourceRetrieve"); 60 60 mr_request.setAttribute("to", to);
Note:
See TracChangeset
for help on using the changeset viewer.