The only way I got it to work was to leave the field out of the beaneditor
and present it as a normal textfield. If you're using the default template,
use a div type of beaneditor-row and it all looks uniform.
On Apr 22, 2012 2:21 AM, "Chris Cureau" <cmcur...@gmail.com> wrote:

> I've been trying to add my own parameters to a beanedit to get the
> autocomplete mixin to work, but I'm having little luck.  Is this possible?
>  I added a println to the java code for the provideCompletions, but it
> doesn't seem that the method is ever getting called...
>
> AddressAdd.tml:
> <t:form t:id="form" clientValidation="false">
> <div t:type="beanEditor" object="zipCode">
>  <p:name>
> <t:label for="zcode" />
> <t:textfield t:id="zcode" t:mixins="Autocomplete"
>  t:value="zipCode.code" translate="zipcode" />
> </p:name>
>  </div>
>         </t:form>
>
> AddressAdd.java
> @OnEvent(value = "provideCompletions")
>  List<String> zcode(String partial) {
> List<String> result = new ArrayList<String>();
>  List<ZipCode> matches = zipCodeDAO.findByPartialZipCode(partial);
>  for (ZipCode z : matches) {
> result.add(z.getCode());
> }
>  System.out.println("\n\nin completions\n\n");
> return result;
> }
>
>
>
>

Reply via email to