Hi,

I have been trying to do the following using a variety of techniques in 
polymer.

What I want do is create a polymer-element that generates a list based on 
an ajax request, but that also .
It's basically a polymer rebuild of the 'select2' library for 
autocompletion.

So, the base template I have so far looks like this:

<polymer-element name="auto-complete" attributes="url_base item_template">
<aj-ax id="xhr" url="{{url_base}}" params="{}" handle_as="json" 
on-ajax-response="{{handle_res}}" on-ajax-error="{{handle_err}}"></aj-ax>
    <input id="eingabe" type="text" on-keyup="{{process_request}}" 
on-blur="{{hide_dropdown}}"/>
    <div id="dropdown" hidden?="{{hide}}">
      <ul>
        <template repeat="{{i in items}}">
          <li> i.text  
             <!-- 
                   the above works, but I want to make it more generic so 
that you can pass in a template that reads the item model such as
                   <template ref="{{item_template}}" 
bind="bind"></template>  
                   where item_template is in some outside scope
              -->
          </li>
        </template>
      </ul>
</polymer-element >
    </div>


I've also tried to make a base auto-complete.html polymer-element and then 
extend it based on the auto-complete type...but to no avail.


Any thoughts, ideas?

I want to stick to declarative methods if possible and avoid having to 
build the DOM elements myself with document.createElement
Is that even possible?

thanks, best -august.

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/0cb13177-d160-4062-a1d3-dba003899f96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to