I have extended the default search generator that comes with cocoon to meet my requirements. One of these requirements is that searches can be limited to certain collections of documents. I implement this with checkboxes on the HTML form. For example, I have the following form:
[some query______________] query string
[*] Collection 1 [ ] Collection 2 [*] Collection 3
[Submit]
Ok, so when I submit the form the url looks something like this:
http://mymachine.com/webapp/search?queryString=some+query&colls=coll1&colls=coll3
In my search generator I want to get the request parameters so I can build the proper lucene query. The problem is that my checkboxes have the same name (colls) and when I try to do a request.getParameter("colls"), I only get the first checked box. How do I get them all?
here is the code segment:
// get collections to search
param_name = par.getParameter(COLL_PARAM, COLL_PARAM_DEFAULT);
if (request.getParameter(param_name) != null) {
collection = request.getParameter(param_name);
}System.out.println(collection);
So, using the query generated by my sample form above, I would see "coll1" printed in the logs and not coll3. I need to get both. How is this done?
Thanks!
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
