Ignore:
Timestamp:
2002-10-25T16:33:34+13:00 (22 years ago)
Author:
kjdon
Message:

actions all use cgi arg long names now, not short names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/action/QueryAction.java

    r3467 r3491  
    6363    HashMap params = GSXML.extractParams(cgi_paramList);
    6464
    65     String collection = (String)params.get("c");
     65    String collection = (String)params.get("collection");
    6666    if (collection == null || collection.equals("")) {
    6767        return GSHTML.errorPage("textquery, need to specify a colleciton!");
     
    9494    else {
    9595        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            }
    113114        }
     115        param = (Element)param.getNextSibling();
    114116        }
    115         param = (Element)param.getNextSibling();
    116     }
    117    
     117    }
    118118    cgi_request.appendChild(description);
    119119   
    120120    // check the query string
    121     String query = (String)params.get("q");
     121    String query = (String)params.get("query");
    122122
    123123    if (query==null|| query.equals("")) {
Note: See TracChangeset for help on using the changeset viewer.