Absolutely !, thanks a lot Igor, I'll try it right now. I agree that is an
uncommon use case and it doesn't deserve an api change and a custom solution is
what is needed.
Jaime.
Igor Vaynberg <[EMAIL PROTECTED]> wrote: ok, this is a bit tricky but is def
doable. i dont think this is a very common usecase, so i dont think we will
create all the factories/etc for you to be able to do this out of the box
because in most cases it will just be api bloat.
that said, although not trivial it is still def very possible
start with extending the autocompletebehavior
override getcallbackurl and do something like
return
super.getcallbackurl()+"+'&limiter='+document.getelementbyid('someid').value");
so now whenever the url is invoked for the autocomplete it will also contain a
"limiter" param whose value will be the value of that textfield - make sure
someid is the id of that textfield.
then simply create your own component, or add the behavior directly to a
textfield, see AutoCompleteTextField source - its rather trivial.
now in your getchoices() you can do getrequest().getparameter("limiter") and
that will give you that extra value you need to filter
make sense?
-igor
On 3/26/07, Jaime De La Jara <[EMAIL PROTECTED]> wrote: Basically what I need
is to narrow the possible choices of the autocomplete field, depending on the
value the user entered in the other field (which is a normal field).
This is a user requirement to simplify their data entry, in this case the
normal field is an invoice number and the autocomplete field corresponds to the
vendor name, so if the user enters invoice number 0189, and in the autocomplete
he types "E" the list displayed should show only the vendors whose name start
with an "E" and
have an invoice numbered 0189.
Thanks,
Jaime.
Igor Vaynberg < [EMAIL PROTECTED]> wrote:
On 3/26/07, Jaime De La Jara <[EMAIL PROTECTED]> wrote:
Hi, I have a form with some fields and a AutoCompleteTextField that is
working nice, however now I need to retrieve the value of a TextField from this
AutoCompleteTextField so I can restrict the values shown for autocompletion. Is
this possible?
umm...isnt that what the autocomplete is for? you are in control of the
choices, so why would you need to further restrict them?
-igor
in the affirmative case, could you give me a hint?
Thanks,
Jaime.
---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
---------------------------------
Looking for earth-friendly autos?
Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user