Changeset 8714


Ignore:
Timestamp:
2004-12-01T11:37:21+13:00 (19 years ago)
Author:
kjdon
Message:

fixed up query term highlighting with the new s1. service params

File:
1 edited

Legend:

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

    r8676 r8714  
    424424    return result;
    425425    }
    426 
     426   
    427427    /** tell the param class what its arguments are
    428428     * if an action has its own arguments, this should add them to the params
     
    514514    HashMap params = GSXML.extractParams(cgi_param_list, false);
    515515   
    516     String service_name = (String)params.get(GSParams.SERVICE);
     516   
     517    String service_name = (String)((HashMap)params.get("p")).get(GSParams.SERVICE);
    517518    if (service_name == null || !service_name.endsWith("Query")) { // hack for now - we only do highlighting if we were in a query last - ie not if we were in a browse thingy
     519        System.err.println("DocumentAction: invalid service, not doing highlighting");
    518520        return dc_response_doc_content;
    519521    }
     
    528530   
    529531    // paramList
    530     Element query_param_list = (Element)this.doc.importNode(cgi_param_list, true);
     532    HashMap service_params = (HashMap)params.get("s1");
     533   
     534    Element query_param_list = this.doc.createElement(GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
     535    GSXML.addParametersToList(this.doc, query_param_list, service_params);
    531536    mr_query_request.appendChild(query_param_list);
    532537
    533538    // do the query
    534539        Element mr_query_response = (Element)this.mr.process(mr_query_message);
    535 
     540   
    536541    String path = GSPath.appendLink(GSXML.RESPONSE_ELEM, GSXML.TERM_ELEM+GSXML.LIST_MODIFIER);
    537542    Element query_term_info_list = (Element) GSXML.getNodeByPath(mr_query_response, path);
Note: See TracChangeset for help on using the changeset viewer.