Hi George, Great to hear that the component can be of use to others than myself.
Using objects instead of strings is no problem. I do it myself. Just use the t:encoder-parameter and provide a ValueEncoder for it. I haven't had strings with less/greater than signs and have not stumbled over this problem. I'll take a look at it (or if you want to fork the project on GitHub and send a pull request I'll gladly accept that as well :-) ). I'll think about a solution for limiting the number of selectable values as well. I'm not sure I understand your last question though, which part do you want to populate from a database? The autocompleter or the input-field? I do both in my application without problems. Please provide more information. Regards, Joakim On Tue, Aug 9, 2011 at 6:50 PM, George Christman <gchrist...@cardaddy.com> wrote: > Hi Joakim, > > Thanks for the screen shot. Seems to be pretty close to exactly what I was > looking for. I have a few questions which I hope you'll be able to answer. > I'd like to pass an object into the component rather than a string and > define it by it's entity label which would make updates a breeze. When using > a string it also causes an issue when using greater than less than signs. > example "Your Name <yourem...@domain.com>. The String gets split on > commit due to the < sign ending up with a comma. See code below. > > I'd also like to limit the total number of results which could be used > within the input field. Example, I might use this where only a single result > would be allowed. > > Lastly, when updating a page, I'd like the component to populate from the > database, is that possible? > > public void onPrepare() { > if (this.authorizers == null) { > this.authorizers = new ArrayList<String>(); > } > } > > SelectModel onProvideCompletionsFromAuthorizers(String partial) { > HashSet<ApplicationUser> hashset = new HashSet<ApplicationUser>(); > partial = partial.toUpperCase(); > > for (ApplicationUser applicationUser : applicationUsers) { > > if (applicationUser.getName().toUpperCase().startsWith(partial)) > { > hashset.add(applicationUser); > } > > if > (applicationUser.getEmail().toUpperCase().startsWith(partial)) { > hashset.add(applicationUser); > } > } > > return selectModelFactory.create(new > ArrayList<ApplicationUser>(hashset), "Label"); > } > > -- > View this message in context: > http://tapestry.1045711.n5.nabble.com/ANN-Tapestry-tagselect-version-1-0-released-tp4639340p4682764.html > Sent from the Tapestry - User mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org