Changeset 14946 for greenstone3

Show
Ignore:
Timestamp:
24.01.2008 10:04:41 (12 years ago)
Author:
shaoqun
Message:

try HitsPerPage? and StartPage? in service params first to work with does_paging param

Files:
1 modified

Legend:

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

    r13270 r14946  
    107107    mr_query_message.appendChild(format_request); 
    108108 
     109    logger.info(GSXML.xmlNodeToString(mr_query_message)); 
     110 
    109111    // do the query 
    110112        Element mr_query_response = (Element)this.mr.process(mr_query_message); 
     
    207209    // check the hits_per_page param - is it a service param?? 
    208210    String hits_pp = (String) service_params.get("hitsPerPage"); 
    209     if (hits_pp != null) { 
     211    //if (hits_pp != null) { 
    210212        // the service is doing the paging, so we want to display all of the returned docs 
    211         return (Element)this.doc.importNode(orig_doc_list, true); 
    212     } 
    213      
    214     hits_pp = (String)params.get("hitsPerPage"); 
     213    //    return (Element)this.doc.importNode(orig_doc_list, true); 
     214    //} 
     215     
     216    //String hits_pp = (String)params.get("hitsPerPage"); 
    215217    int hits = 20; 
    216218    if (hits_pp != null && !hits_pp.equals("")) { 
     
    235237    // now we need our own doc list 
    236238    Element result_list = this.doc.createElement(GSXML.DOC_NODE_ELEM + GSXML.LIST_MODIFIER); 
    237     String start_p = (String)params.get("startPage"); 
     239     
     240    String start_p = (String) service_params.get("startPage"); 
     241    if(start_p == null){ 
     242        start_p = (String)params.get("startPage"); 
     243    } 
     244 
    238245    int start = 1; 
    239246    if (start_p != null && !start_p.equals("")) {