Scenario 2 talks about what to do when the user is supposed to pick something in the list. If you are using the onKeyPress event, when the user types what would be an invalid key, couldn't you reset the value of the input text field back to the previous value before the key press?
So if the valid values are blue, and brown, and the user mitakenly types bt, then instead of allowing bt to be in the input text box reset it to the previous value of b. That way the user is not allowed to type invalid characters and no error message is needed. What do you think about that? --- Sean Schofield <[EMAIL PROTECTED]> wrote: > Good. It sounds like there is a lot of interest in > this. Also, all > of you who have commented favorably have just > volunteered to be > testers ;-) > > Seriously though, I will need all of your feedback > on the ideas and > then I will need people to try out the latest CVS > code when it > becomes available. I am reading up on some of the > input controls now > and studying how they working in MyFaces. > > In the meantime, I could use some feedback on a few > ideas. I am > thinking that this component is a combination of > SelectOneListBox and > inputText. > > Scenario 1: > > If the developer specifies that the user is allowed > to submit new > values, then the user types free text and ignores > the suggestions. In > this case the text is submitted but without a > "value" (id). It will > be up to the developer to provide a value change > listener and handle > the new value (for instance, adding it to the > appropriate database > lookup table and then setting the newly created id) > > Scenario 2: > > The developer specifies that the user can only > select from an existing > set of values (like a list box). Then the component > will provide a > validator to enforce this and its up to the > developer to provide the > appropriate error message. Also, it might be > possible to limit it on > the client side as to what they can type (based on > the choices) but > that might be a little difficult (and a little > overkill). > > Thoughts? > > sean > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com

