You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Sean Schofield <se...@gmail.com> on 2005/02/12 22:24:03 UTC
New component idea: MyFaces Suggest
I have an idea for the next component I can contribute. I am still
working on the revised tree but there is a new component that I am
working on that I think would be very useful for others.
Basically it would be a "suggest" input component. So it would look
like a regular input text field but once you started typing in it, it
would "suggest" choices. For those of you not familiar with "google
suggest" you should check that feature out for a better idea of what I
mean.
Unlike google's suggest feature it would not dynamically communicate
with the server to update the list. You would specify a finite list
via a backing bean and those would be the choices. You could also
specify whether to require the value be one of the choices listed (it
would have an internal validatation method provided.)
I had the idea for this feature when our users complained about now
having the "type ahead" stuff in our webapp that they were used to
seeing in their otherwise lousy Oracle Forms application. (Not a slam
on Oracle Forms, just this implementation.)
Anyways, I am working with someone who is doing all of the javascript
and DHTML necessary. It wil work in IE and Firefox. I will port it
over to JSF and offer it to MyFaces if there is interest.
sean
Re: New component idea: MyFaces Suggest
Posted by Ray Clark <rc...@yahoo.com>.
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 <se...@gmail.com> 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
Re: New component idea: MyFaces Suggest
Posted by Sean Schofield <se...@gmail.com>.
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
Re: New component idea: MyFaces Suggest
Posted by Martin Marinschek <ma...@gmail.com>.
I would like to have that one as well ;)
regards,
Martin
On Sat, 12 Feb 2005 18:31:55 -0800 (PST), Ray Clark
<rc...@yahoo.com> wrote:
> Well, I was working on my reply before I saw your
> post. This would be great. I really like the idea of
> showing the user the choices that are close so that
> they can pick the one that they really want. I can
> see me showing this to my analysts as soon as you get
> the javascript and DHTML done. I know I'm really
> interested in seeing it.
>
> Great idea.
>
> --- Sean Schofield <se...@gmail.com> wrote:
>
> > Kind of like that except I was thinking that in
> > addition to the "type
> > ahead" stuff you would also get the drop down that
> > would show other
> > simliar choices. So you can keep typing or chose
> > one from the list.
> > Unlike google's version you would also have the
> > option to scroll (with
> > settings that would allow you to turn off the scroll
> > bar.)
> >
> > My coworker and I are stil hammering out the kinks.
> > We'll have a
> > working example (just javascript and DHTML no faces)
> > shortly. Then I
> > will port it over to JSF.
> >
> > sean
> >
> >
> > On Sun, 13 Feb 2005 01:43:42 +0100, Michał Małecki
> > <mi...@poczta.onet.pl> wrote:
> > > Hey Sean,
> > > something like that
> > >
> > > http://www.man.poznan.pl/~mmalecki/ehead.html ?
> > > I think the best would be to mimic google suggest
> > (I mean combo box like view, not server-side
> > communcation),but it would definetelly more dhtml
> > magic
> > > Michał Małecki
> > >
> > >
> > > >I have an idea for the next component I can
> > contribute. I am still
> > > >working on the revised tree but there is a new
> > component that I am
> > > >working on that I think would be very useful for
> > others.
> > > >
> > > >Basically it would be a "suggest" input
> > component. So it would look
> > > >like a regular input text field but once you
> > started typing in it, it
> > > >would "suggest" choices. For those of you not
> > familiar with "google
> > > >suggest" you should check that feature out for a
> > better idea of what I
> > > >mean.
> > > >
> > > >Unlike google's suggest feature it would not
> > dynamically communicate
> > > >with the server to update the list. You would
> > specify a finite list
> > > >via a backing bean and those would be the
> > choices. You could also
> > > >specify whether to require the value be one of
> > the choices listed (it
> > > >would have an internal validatation method
> > provided.)
> > > >
> > > >I had the idea for this feature when our users
> > complained about now
> > > >having the "type ahead" stuff in our webapp that
> > they were used to
> > > >seeing in their otherwise lousy Oracle Forms
> > application. (Not a slam
> > > >on Oracle Forms, just this implementation.)
> > > >
> > > >Anyways, I am working with someone who is doing
> > all of the javascript
> > > >and DHTML necessary. It wil work in IE and
> > Firefox. I will port it
> > > >over to JSF and offer it to MyFaces if there is
> > interest.
> > > >
> > > >sean
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> >
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Helps protect you from nasty viruses.
> http://promotions.yahoo.com/new_mail
>
Re: New component idea: MyFaces Suggest
Posted by Ray Clark <rc...@yahoo.com>.
Well, I was working on my reply before I saw your
post. This would be great. I really like the idea of
showing the user the choices that are close so that
they can pick the one that they really want. I can
see me showing this to my analysts as soon as you get
the javascript and DHTML done. I know I'm really
interested in seeing it.
Great idea.
--- Sean Schofield <se...@gmail.com> wrote:
> Kind of like that except I was thinking that in
> addition to the "type
> ahead" stuff you would also get the drop down that
> would show other
> simliar choices. So you can keep typing or chose
> one from the list.
> Unlike google's version you would also have the
> option to scroll (with
> settings that would allow you to turn off the scroll
> bar.)
>
> My coworker and I are stil hammering out the kinks.
> We'll have a
> working example (just javascript and DHTML no faces)
> shortly. Then I
> will port it over to JSF.
>
> sean
>
>
> On Sun, 13 Feb 2005 01:43:42 +0100, Michał Małecki
> <mi...@poczta.onet.pl> wrote:
> > Hey Sean,
> > something like that
> >
> > http://www.man.poznan.pl/~mmalecki/ehead.html ?
> > I think the best would be to mimic google suggest
> (I mean combo box like view, not server-side
> communcation),but it would definetelly more dhtml
> magic
> > Michał Małecki
> >
> >
> > >I have an idea for the next component I can
> contribute. I am still
> > >working on the revised tree but there is a new
> component that I am
> > >working on that I think would be very useful for
> others.
> > >
> > >Basically it would be a "suggest" input
> component. So it would look
> > >like a regular input text field but once you
> started typing in it, it
> > >would "suggest" choices. For those of you not
> familiar with "google
> > >suggest" you should check that feature out for a
> better idea of what I
> > >mean.
> > >
> > >Unlike google's suggest feature it would not
> dynamically communicate
> > >with the server to update the list. You would
> specify a finite list
> > >via a backing bean and those would be the
> choices. You could also
> > >specify whether to require the value be one of
> the choices listed (it
> > >would have an internal validatation method
> provided.)
> > >
> > >I had the idea for this feature when our users
> complained about now
> > >having the "type ahead" stuff in our webapp that
> they were used to
> > >seeing in their otherwise lousy Oracle Forms
> application. (Not a slam
> > >on Oracle Forms, just this implementation.)
> > >
> > >Anyways, I am working with someone who is doing
> all of the javascript
> > >and DHTML necessary. It wil work in IE and
> Firefox. I will port it
> > >over to JSF and offer it to MyFaces if there is
> interest.
> > >
> > >sean
> > >
> > >
> > >
> > >
> >
> >
>
__________________________________
Do you Yahoo!?
Yahoo! Mail - Helps protect you from nasty viruses.
http://promotions.yahoo.com/new_mail
Re: New component idea: MyFaces Suggest
Posted by Sean Schofield <se...@gmail.com>.
Kind of like that except I was thinking that in addition to the "type
ahead" stuff you would also get the drop down that would show other
simliar choices. So you can keep typing or chose one from the list.
Unlike google's version you would also have the option to scroll (with
settings that would allow you to turn off the scroll bar.)
My coworker and I are stil hammering out the kinks. We'll have a
working example (just javascript and DHTML no faces) shortly. Then I
will port it over to JSF.
sean
On Sun, 13 Feb 2005 01:43:42 +0100, Michał Małecki
<mi...@poczta.onet.pl> wrote:
> Hey Sean,
> something like that
>
> http://www.man.poznan.pl/~mmalecki/ehead.html ?
> I think the best would be to mimic google suggest (I mean combo box like view, not server-side communcation),but it would definetelly more dhtml magic
> Michał Małecki
>
>
> >I have an idea for the next component I can contribute. I am still
> >working on the revised tree but there is a new component that I am
> >working on that I think would be very useful for others.
> >
> >Basically it would be a "suggest" input component. So it would look
> >like a regular input text field but once you started typing in it, it
> >would "suggest" choices. For those of you not familiar with "google
> >suggest" you should check that feature out for a better idea of what I
> >mean.
> >
> >Unlike google's suggest feature it would not dynamically communicate
> >with the server to update the list. You would specify a finite list
> >via a backing bean and those would be the choices. You could also
> >specify whether to require the value be one of the choices listed (it
> >would have an internal validatation method provided.)
> >
> >I had the idea for this feature when our users complained about now
> >having the "type ahead" stuff in our webapp that they were used to
> >seeing in their otherwise lousy Oracle Forms application. (Not a slam
> >on Oracle Forms, just this implementation.)
> >
> >Anyways, I am working with someone who is doing all of the javascript
> >and DHTML necessary. It wil work in IE and Firefox. I will port it
> >over to JSF and offer it to MyFaces if there is interest.
> >
> >sean
> >
> >
> >
> >
>
>
Re: New component idea: MyFaces Suggest
Posted by Ray Clark <rc...@yahoo.com>.
This is a great idea.
Do you think something like this could be done with
the selectOneListbox, or selectOneMenu? It just runs
off of the onKeyPress event. When a match is found
you set the selectedIndex of the select box to be the
match that the script is suggesting. IE has this but
only fir the first letter. So I don't know if IE
would get in the way of the script trying to do
something. But this would be great if it could be
done to these components also.
What do you think?
--- Micha� Ma�ecki <mi...@poczta.onet.pl> wrote:
> Hey Sean,
> something like that
>
> http://www.man.poznan.pl/~mmalecki/ehead.html ?
> I think the best would be to mimic google suggest (I
> mean combo box like view, not server-side
> communcation),but it would definetelly more dhtml
> magic
> Micha� Ma�ecki
>
>
> >I have an idea for the next component I can
> contribute. I am still
> >working on the revised tree but there is a new
> component that I am
> >working on that I think would be very useful for
> others.
> >
> >Basically it would be a "suggest" input component.
> So it would look
> >like a regular input text field but once you
> started typing in it, it
> >would "suggest" choices. For those of you not
> familiar with "google
> >suggest" you should check that feature out for a
> better idea of what I
> >mean.
> >
> >Unlike google's suggest feature it would not
> dynamically communicate
> >with the server to update the list. You would
> specify a finite list
> >via a backing bean and those would be the choices.
> You could also
> >specify whether to require the value be one of the
> choices listed (it
> >would have an internal validatation method
> provided.)
> >
> >I had the idea for this feature when our users
> complained about now
> >having the "type ahead" stuff in our webapp that
> they were used to
> >seeing in their otherwise lousy Oracle Forms
> application. (Not a slam
> >on Oracle Forms, just this implementation.)
> >
> >Anyways, I am working with someone who is doing all
> of the javascript
> >and DHTML necessary. It wil work in IE and
> Firefox. I will port it
> >over to JSF and offer it to MyFaces if there is
> interest.
> >
> >sean
> >
> >
> >
> >
>
>
>
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
Re: New component idea: MyFaces Suggest
Posted by Michał Małecki <mi...@poczta.onet.pl>.
Hey Sean,
something like that
http://www.man.poznan.pl/~mmalecki/ehead.html ?
I think the best would be to mimic google suggest (I mean combo box like view, not server-side communcation),but it would definetelly more dhtml magic
Michał Małecki
>I have an idea for the next component I can contribute. I am still
>working on the revised tree but there is a new component that I am
>working on that I think would be very useful for others.
>
>Basically it would be a "suggest" input component. So it would look
>like a regular input text field but once you started typing in it, it
>would "suggest" choices. For those of you not familiar with "google
>suggest" you should check that feature out for a better idea of what I
>mean.
>
>Unlike google's suggest feature it would not dynamically communicate
>with the server to update the list. You would specify a finite list
>via a backing bean and those would be the choices. You could also
>specify whether to require the value be one of the choices listed (it
>would have an internal validatation method provided.)
>
>I had the idea for this feature when our users complained about now
>having the "type ahead" stuff in our webapp that they were used to
>seeing in their otherwise lousy Oracle Forms application. (Not a slam
>on Oracle Forms, just this implementation.)
>
>Anyways, I am working with someone who is doing all of the javascript
>and DHTML necessary. It wil work in IE and Firefox. I will port it
>over to JSF and offer it to MyFaces if there is interest.
>
>sean
>
>
>
>
Re: New component idea: MyFaces Suggest
Posted by Travis Reeder <tr...@ecommstats.com>.
Great idea, would be cool to have the option of loading dynamically like
google suggest as well for large data sets.
Travis
Sean Schofield wrote:
>I have an idea for the next component I can contribute. I am still
>working on the revised tree but there is a new component that I am
>working on that I think would be very useful for others.
>
>Basically it would be a "suggest" input component. So it would look
>like a regular input text field but once you started typing in it, it
>would "suggest" choices. For those of you not familiar with "google
>suggest" you should check that feature out for a better idea of what I
>mean.
>
>Unlike google's suggest feature it would not dynamically communicate
>with the server to update the list. You would specify a finite list
>via a backing bean and those would be the choices. You could also
>specify whether to require the value be one of the choices listed (it
>would have an internal validatation method provided.)
>
>I had the idea for this feature when our users complained about now
>having the "type ahead" stuff in our webapp that they were used to
>seeing in their otherwise lousy Oracle Forms application. (Not a slam
>on Oracle Forms, just this implementation.)
>
>Anyways, I am working with someone who is doing all of the javascript
>and DHTML necessary. It wil work in IE and Firefox. I will port it
>over to JSF and offer it to MyFaces if there is interest.
>
>sean
>
>
>
--
Travis Reeder
Ecommstats Web Analytics
www.ecommstats.com