- Timestamp:
- 2002-10-25T16:33:34+13:00 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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("")) {
Note:
See TracChangeset
for help on using the changeset viewer.