On Fri, 20 Oct 2000, [iso-8859-1] Tiago Ant�o wrote:

> On Thu, 19 Oct 2000, Milt Epstein wrote:
>
> > That said, the entire scope of the original problem was not specified
> > completely enough to indicate whether relying on this behavior was
> > avoidable.  It didn't sound like the cleanest design, from what was
> > said, so maybe it could be redone to avoid relying on this behavior.
>
>   Imagine a big form with repetive type of input, in our case a list of
> student numbers and grades.
>
>   There are two ways:
>    1. You rely on order
>    2. You simulate order, for example, using the sugestion previously
> given, naming form parameters as 1_name, 2_name, 3_name, ...
>
>  So if order is not available, at least some kind of parsing will be
> needed on parameter names (to recreate that order).
>
>  The good news is that order is preserved in
> getParameterValues(paramName), so, if you use repeatdly the same
> parameter name the order of the array retured is equal to the
> specification in the html form.
>
>   For big forms, with the same type of content repeated, order is a
> must. The option in the Servlet API, fortunately, is enough: for the same
> parameter name, order is preserved.

If that works OK, then fine.  But there are other possibilities.  For
example, maybe it doesn't have to be such a big form.  Or, if you have
control over generation of the form -- and that will often be the
case, if it's all part of the same application -- then both the code
that's generating the form and processing it can know everything they
need to know about the parameters.  I believe you said that wasn't the
case, that the form was coming from somewhere else.  But it doesn't
have to be that way (and maybe that's a decision that can be looked
at.)

Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to