Try assigning the <t:textfield /> to a String as oppose to a List.

 @Property
 private String matches;

As textboxes generally update a String.

You'll then have to provide an event handler for "provideCompletions"
as described here:

http://tapestry.apache.org/5.2/tapestry-core/ref/org/apache/tapestry5/corelib/mixins/Autocomplete.html

Steve.


On 27 October 2011 18:12, csckid <testnowsh...@gmail.com> wrote:
> I am trying to test Autocomplete using tapestry5. I get the following
> exception:
>
> Render queue error in BeginRender[About:fnametf]: Parameter 'translate' of
> component About:fnametf is bound to null. This parameter is not allowed to
> be null.
>
> About.tml
> <html t:type="layout" title="About tapestryHiber"
>      xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";
>      xmlns:p="tapestry:parameter">
>
>    <p>About tapestryHiber application ...</p>
>        <div style="margin: 20px;">
>                <form t:type="form">
>                        Type in a country name:
>                        <input t:id="fNameTf" t:type="TextField" 
> t:mixins="autocomplete"
> value="matches"/>
>                </form>
>        </div>
>
> </html>
>
>
> About.java
> package com.kids.crm.pages;
>
> import java.util.ArrayList;
> import java.util.List;
>
> import org.apache.tapestry5.annotations.Persist;
> import org.apache.tapestry5.annotations.Property;
> import org.apache.tapestry5.ioc.annotations.Inject;
>
> import com.kids.crm.dao.DatabaseDao;
> import com.kids.crm.dao.WholeSaleMemberDao;
> import com.kids.crm.db.TruckWoodPrice;
>
> public class About {
>
>        @Property
>        private List<String> matches;
>
>        @Inject
>        private WholeSaleMemberDao wholeSaleMemberDao;
>
>        List<String> onProvideCompletionsFromfNameTf(String partial) {
>                partial = partial.toUpperCase();
>                matches = 
> wholeSaleMemberDao.getWholeSaleMembersPartialFName(partial);
>                return matches;
>        }
>
> }
>
>
>
>
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/autocomplete-tp4942541p4942541.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

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

Reply via email to