You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by luna_guo <gh...@163.com> on 2008/04/17 03:57:49 UTC
how to use t5 complete mixin
t5 beta:
Start.tml:
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
<head>
<title>tutorial1 Start Page</title>
</head>
<body>
<t:form>
<input type="text" t:type="textfield" t:id="title"
t:mixins="autocomplete" tokens=",;" size="10"/>
</t:form>
</body>
</html>
Start.java:
import java.util.List;
import org.apache.tapestry.annotations.Persist;
import org.apache.tapestry.ioc.internal.util.CollectionFactory;
public class Start {
@Persist
private String _title;
List onProvideCompletionsFromTitle(String partialTitle) throws Exception
{
List<String> ls=CollectionFactory.newList();
ls.add("123");
ls.add("1234");
return ls;
}
public String getTitle()
{
return _title;
}
public void setTitle(String title)
{
_title = title;
}
}
but i allways get a exception page:
Parameter(s) translate, value are required for
org.apache.tapestry.corelib.components.TextField, but have not been bound.
location
<input type="text" t:type="textfield" t:id="title" t:mixins="autocomplete"
tokens=",;" size="10"/>
what's the matter?Hellp me please.
--
View this message in context: http://www.nabble.com/how-to-use-t5-complete-mixin-tp16737269p16737269.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: how to use t5 complete mixin
Posted by Chris Lewis <ch...@bellsouth.net>.
You need to at least provide the t:textfield component with the value
parameter (the property that populates it). See:
http://tapestry.apache.org/tapestry5/tapestry-core/ref/org/apache/tapestry/corelib/components/TextField.html.
chris
luna_guo wrote:
> t5 beta:
> Start.tml:
> <html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd">
> <head>
> <title>tutorial1 Start Page</title>
> </head>
> <body>
> <t:form>
> <input type="text" t:type="textfield" t:id="title"
> t:mixins="autocomplete" tokens=",;" size="10"/>
> </t:form>
> </body>
> </html>
> Start.java:
> import java.util.List;
>
> import org.apache.tapestry.annotations.Persist;
> import org.apache.tapestry.ioc.internal.util.CollectionFactory;
>
> public class Start {
> @Persist
> private String _title;
>
> List onProvideCompletionsFromTitle(String partialTitle) throws Exception
> {
> List<String> ls=CollectionFactory.newList();
> ls.add("123");
> ls.add("1234");
> return ls;
> }
>
> public String getTitle()
> {
> return _title;
> }
>
> public void setTitle(String title)
> {
> _title = title;
> }
>
> }
>
> but i allways get a exception page:
>
> Parameter(s) translate, value are required for
> org.apache.tapestry.corelib.components.TextField, but have not been bound.
> location
> <input type="text" t:type="textfield" t:id="title" t:mixins="autocomplete"
> tokens=",;" size="10"/>
>
>
> what's the matter?Hellp me please.
>
--
http://thegodcode.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org