jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grant Jokerst" <gr...@jokerst.com>
Subject RE: Adding sort to <input:select> tag
Date Fri, 16 Aug 2002 03:23:08 GMT
Could someone tell me how I can get write access to the CVS respository for
changes I have made?

Thanks,
Grant

----- Original Message -----
From: "Grant Jokerst" <grant@jokerst.com>
To: <taglibs-dev@jakarta.apache.org>
Cc: <grant@jokerst.com>; <grant.jokerst@wcg.com>
Sent: Tuesday, August 13, 2002 12:35 PM
Subject: Adding sort to <input:select> tag


> Hello,
>    I would like to add a few enhancements to the input taglib.  I am using
> the input tags to simplify building context based form elements as the
user
> enters data by refreshing page (and retaining entered values).  Currently
> the <input:select> tag interates through the hash's keys without sorting.
> This results in a random ordering of the dropdown list.  I would like to
add
> the following to org.apache.taglibs.input.Select.java (Select.java source
> attached):
> ...
>    // actually print the <option> tags (line 138)
>       if (options != null) {
>          Vector vecOpts = new Vector(options.keySet()); // add
>          Collections.sort(vecOpts);                     // add
>          Iterator i = vecOpts.iterator();               // add
>          //Iterator i = options.keySet().iterator();    // replace
>          while (i.hasNext()) {
>             Object oKey = i.next();
> ...
>
> I would also like to either add or change the "attributes" attribute for
the
> tags to accept a string of the atttributes (ex: "size=30
> onchange="javascript:someFunc();").  This is easier and less clunky than
> having to define a Hashtable for the "attributes" with scriptlets.  I have
> other ideas too if I am given Commiter priviledges.
>
> Thanks,
> Grant
>

Mime
View raw message