Ignore:
Timestamp:
2005-05-04T15:34:14+12:00 (19 years ago)
Author:
kjdon
Message:

looks for error elements after a call to the message router. also check that previous params exist before trying to use one in highlight query terms

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ant-install-branch/gsdl3/src/java/org/greenstone/gsdl3/action/DocumentAction.java

    r9007 r9806  
    209209        // Process the document structure retrieve message
    210210        Element ds_response_message = (Element) this.mr.process(ds_message);
    211        
     211        if (processErrorElements(ds_response_message, page_response)) {
     212        return result;
     213        }
     214
    212215        // get the info and print out
    213216        String path = GSPath.appendLink(GSXML.RESPONSE_ELEM, GSXML.DOC_NODE_ELEM+GSXML.LIST_MODIFIER);
     
    309312    doc_list.appendChild(doc_node);
    310313    Element dm_response_message = (Element) this.mr.process(dm_message);
     314    if (processErrorElements(dm_response_message, page_response)) {
     315        return result;
     316    }
    311317
    312318    String path = GSPath.appendLink(GSXML.RESPONSE_ELEM, GSXML.DOC_NODE_ELEM+GSXML.LIST_MODIFIER);
     
    348354    System.err.println("request = "+converter.getString(dc_message));
    349355    Element dc_response_message = (Element) this.mr.process(dc_message);
     356    if (processErrorElements(dc_response_message, page_response)) {
     357        return result;
     358    }
     359
    350360    Element dc_response_doc_list = (Element) GSXML.getNodeByPath(dc_response_message, path);
    351361
     
    536546    HashMap params = GSXML.extractParams(cgi_param_list, false);
    537547   
    538    
    539     String service_name = (String)((HashMap)params.get("p")).get(GSParams.SERVICE);
     548    HashMap previous_params = (HashMap)params.get("p");
     549    if (previous_params == null) {
     550        return dc_response_doc_content;
     551    }
     552        String service_name = (String)previous_params.get(GSParams.SERVICE);
    540553    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
    541554        System.err.println("DocumentAction: invalid service, not doing highlighting");
Note: See TracChangeset for help on using the changeset viewer.