On 07/01/2013, at 11:21 PM, Stephan Windmüller wrote:

> On 07.01.2013 12:07, Geoff Callender wrote:
> 
>> ZoneUpdater does change the URL:
>>      listenerURIWithValue = addRequestParameter('param', param, 
>> listenerURIWithValue);
> 
> You are right, I focused on the Java part.
> 
>> Yes, the example uses @Persist but your problem is different -
>> you could avoid @Persist by trying what I suggested earlier:
> 
> As I explained in my reply to this e-mail of yours, I am unsure on how
> to extend the JavaScript code. Is it necessary to create my own
> AutoComplete component which extends the current one or how do I add the
> JavaScript code properly?

I think you can leave the existing Autocomplete and its javascript alone.

Start by adding a simple JavaScript to the page - it should observe the 
"change" event of the Select element and, on change, modify the autocomplete 
element's url, $T(spec.elementId).autocompleter.url, appending the selected 
value as a a query parameter. Here's an example of a simple observer that 
observes "keyup" (whereas you should observe "change"):

        
http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/javascript

Once that's working you could do a reusable one that receives the 2 element ids 
as parameters, more like these:

        
http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/reusable
        
http://jumpstart.doublenegative.com.au/jumpstart/examples/javascript/robust

Geoff


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

Reply via email to