Hi All!

I have two questions concerning jquery/autocomplete and hopefully one of you can point me to the right direction.

Part 1:

Basically everything is working fine: onProvideCompletions is called and the list is displayed. Unfortunately I need to render a different href and text in the <a> element. So while returning "List<String>" autocomplete does the job well, I noticed the plugin supports JSONObjects, too.
Therefore I tried to return

List<JSONObject> onProvideCompletions()

to return a different label and value.
Idea borrowed from stack overflow:
http://stackoverflow.com/questions/4536055/jquery-autocomplete-where-the-results-are-links

Thus building the object looks like:

final List<JSONObject> results = new ArrayList<JSONObject>(MAX_RESULT_SIZE);
        for (...) {
results.add(new JSONObject().put("value", linkUrl).put("label", linkTitle));
        }

This results in

{
  "value" : "http://localhost:8080/demo/url";,
  "label" : "this is the label for demo-url"
}

But only the label is rendered, still. Any hint how to change the rendering og <a> is welcome.



Part 2:

Is it possible to update a zone due to an autocomplete callback?





Thanks in advance

Jens


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

Reply via email to