- Timestamp:
- 2018-09-13T14:05:59+12:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/action/QueryAction.java
r31774 r32448 21 21 { 22 22 23 public static final String HITS_PER_PAGE = "hitsPerPage";23 public static final String HITS_PER_PAGE_ARG = "hitsPerPage"; 24 24 static Logger logger = Logger.getLogger(org.greenstone.gsdl3.action.QueryAction.class.getName()); 25 26 /** 27 * tell the param class what its arguments are. 28 * if an action has its own arguments, this should add them to 29 * the params object - particularly 30 * important for args that need to be saved to the session 31 */ 32 public boolean addActionParameters(GSParams params) 33 { 34 // some query services don't do paging themselves, in shich case we do it here. Let tell servlet to save the param just in case nothing else is doing that. 35 params.addServiceParameter(HITS_PER_PAGE_ARG, "20", true, false); 36 return true; 37 } 25 38 26 39 /** … … 351 364 { 352 365 353 String hits_pp = (String) service_params.get(HITS_PER_PAGE );366 String hits_pp = (String) service_params.get(HITS_PER_PAGE_ARG); 354 367 355 368 int hits = 20; … … 427 440 protected boolean addHitsParamToService(Document doc, Element service_description, String lang) { 428 441 Element param_list = (Element)GSXML.getChildByTagName(service_description, GSXML.PARAM_ELEM+GSXML.LIST_MODIFIER); 429 Element param = GSXML.createParameterDescription(doc, HITS_PER_PAGE , getTextString("param." + HITS_PER_PAGE, lang, "ServiceRack", null), GSXML.PARAM_TYPE_INTEGER, "20", null, null);442 Element param = GSXML.createParameterDescription(doc, HITS_PER_PAGE_ARG, getTextString("param." + HITS_PER_PAGE_ARG, lang, "ServiceRack", null), GSXML.PARAM_TYPE_INTEGER, "20", null, null); 430 443 Element query_param = GSXML.getNamedElement(param_list, GSXML.PARAM_ELEM, GSXML.NAME_ATT, "query"); 431 444 if (query_param != null) {
Note:
See TracChangeset
for help on using the changeset viewer.