From: Jason W. <jwe...@ci...> - 2000-11-29 01:12:15
|
My list is very long, and the values need to be posted with a form submit, the servlet programmer is going to want something more verbose than an index. I must admit my ignorance, what do you mean by building a custom listener? Thanks, Jason -----Original Message----- From: Dan Steinman <dy...@fu...> To: dyn...@li... <dyn...@li...> Date: Tuesday, November 28, 2000 5:00 PM Subject: Re: [Dynapi-Help] list values instead of list indexes? >I have a partially rewritten List object which needs to be updated a tiny bit to work with the latest DynAPI release. However I think indexes are enough for most cases (though I think it should be returned as an array). You can just build a custom listener, which does whatever you need with the selected indexes. > >Dan > >On Tue, Nov 28, 2000 at 02:32:44PM -0800, Jason Wehmhoener wrote: >> The dynapi example for a multiSelect List does this: >> >> for (i=0;i<mylist.items.length;i++) { >> if (mylist.items[i].selected) str += i+'\n' >> } >> >> What I would like to do is something like this: >> >> for (i=0;i<mylist.items.length;i++) { >> if (mylist.items[i].selected) str += mylist.myvalue+'\n' >> } >> >> With 'myvalue' being the text that is displayed in the list, or better yet, >> an argument defined by mylist.add. >> >> Is something like this possible? >> >> Thanks, >> Jason >> >> _______________________________________________ >> Dynapi-Help mailing list >> Dyn...@li... >> http://lists.sourceforge.net/mailman/listinfo/dynapi-help >_______________________________________________ >Dynapi-Help mailing list >Dyn...@li... >http://lists.sourceforge.net/mailman/listinfo/dynapi-help |