[Opensource] How to deal with multiple values from inputs
Brian Rook
brian.rook at xor.com
Thu Jun 27 14:41:20 PDT 2002
I have an array of checkboxes. Normally, I would name them all the same
thing, give them different values and collect the values using
HttpServletRequest.getParameterValues() which returns a String[].
First question: Is there an easy way to do this with expresso? Currently,
I'm using a hacky workaround:
ServletControllerRequest sr = ( ServletControllerRequest ) request;
HttpServletRequest hreq = ( HttpServletRequest )
sr.getServletRequest();
String[] fileTypes = hreq.getParameterValues("fileTypeInput");
Second question: Is there a way to get this String[] into my DBObject (or
MultiDBObject) so that I can run a query on it? setField only accepts a
String value. If there isn't a way to get this in there so the SQL looks
like "WHERE FILE_TYPE IN (myString[])" so I can query my table on this? If
not, I don't have a problem writing something up that will do this (and
submitting it back to the list for inclusion in a future version, of course)
but it would be nice if anyone had any tips or hints on which
classes/methods to start with.
Thanks,
b
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.jcorporate.com/pipermail/opensource/attachments/20020627/14599376/attachment-0002.htm
More information about the Opensource
mailing list