You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by djst <da...@ctu.dk> on 2012/09/26 15:37:07 UTC

How to get selected value from Autocomplete list onto server side?

Hello everyone.

So I'm writing a system where the scenario should be as follows: A person
rings in and provides a pincode. I input the pincode in a textfield. The
program continuously checks the database for matches and provide
autocompletion on these. If the pin in the textfield matches a value in the
database or if I choose one from the autocompletion list, two other
textfields is updated with values retrieved from the DB based on a pincode
lookup.

Everything works fine except when I select a value from the autocomplete
list I do not get that value onto the server side. In this case this makes
the DB pincode lookup impossible. Is there anyway to add a listener for this
event or do you have any other suggestions on how to do this?

I'm using autocomplete mixin for the autocompletion:
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/Autocomplete.html

and ZoneUpdater for updating the textfields:
http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/onevent

I hope my explanation of the problem is clear enough. If not, please ask
away :)

Best, David



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-get-selected-value-from-Autocomplete-list-onto-server-side-tp5716506.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to get selected value from Autocomplete list onto server side?

Posted by djst <da...@ctu.dk>.
Okay. I'll look in to it.

Thanks for the help. :)



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-get-selected-value-from-Autocomplete-list-onto-server-side-tp5716506p5716510.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to get selected value from Autocomplete list onto server side?

Posted by Dieter Sauvillers <di...@gmail.com>.
I guess what you are looking for is a mix of two different things on
one hand the autocomplete mixin which provides the pincodes, but on
the other hand you want the onvaluechanged from a select component.

Maybe you can look at that implementation, but I think is pretty
similar to the zoneupdater.

Regards

On 26 September 2012 16:25, djst <da...@ctu.dk> wrote:
> Okay...
>
> Isn't there a way another way of implementing this?
>
> Or is there a way to extend or configure the autocomplete mixin to provide
> submission when
> the user chooses from the dropdown menu?
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-get-selected-value-from-Autocomplete-list-onto-server-side-tp5716506p5716508.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to get selected value from Autocomplete list onto server side?

Posted by djst <da...@ctu.dk>.
Okay... 

Isn't there a way another way of implementing this?

Or is there a way to extend or configure the autocomplete mixin to provide
submission when
the user chooses from the dropdown menu?



--
View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-get-selected-value-from-Autocomplete-list-onto-server-side-tp5716506p5716508.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: How to get selected value from Autocomplete list onto server side?

Posted by Dieter Sauvillers <di...@gmail.com>.
Hi,

The autocomplete mixin triggers no submit. So form data is not submitted.
With the zone updater you can "submit" some parameters, but when you
do you have to make sure you persist the data to the backend. Although
this is  behaviour I don't like to encourage.

Kind regards,
Dieter

On 26 September 2012 15:37, djst <da...@ctu.dk> wrote:
> Hello everyone.
>
> So I'm writing a system where the scenario should be as follows: A person
> rings in and provides a pincode. I input the pincode in a textfield. The
> program continuously checks the database for matches and provide
> autocompletion on these. If the pin in the textfield matches a value in the
> database or if I choose one from the autocompletion list, two other
> textfields is updated with values retrieved from the DB based on a pincode
> lookup.
>
> Everything works fine except when I select a value from the autocomplete
> list I do not get that value onto the server side. In this case this makes
> the DB pincode lookup impossible. Is there anyway to add a listener for this
> event or do you have any other suggestions on how to do this?
>
> I'm using autocomplete mixin for the autocompletion:
> http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/mixins/Autocomplete.html
>
> and ZoneUpdater for updating the textfields:
> http://jumpstart.doublenegative.com.au/jumpstart/examples/ajax/onevent
>
> I hope my explanation of the problem is clear enough. If not, please ask
> away :)
>
> Best, David
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/How-to-get-selected-value-from-Autocomplete-list-onto-server-side-tp5716506.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org