When I want to do the tapestry autocomplete example, I face these trouble.
start-
An unexpected application exception has occurred.
Method
example.hellotapestry.pages.AutoCompleteComp.onProvideCompletionsFromCompInput(java.lang.String)
references component id 'CompInput' which does not exist.
---end---
the using tapestry version is 5.3.6.
the using jars is:
the java code is :
--start
package example.hellotapestry.pages;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
public class AutoCompleteComp {
@Property
private String component;
private List components;
List onProvideCompletionsFromCompInput(String key) {
List matches = new ArrayList();
Iterator it=components.iterator();
while (it.hasNext())
{
String element = it.next();
if (element.startsWith(key))
{
matches.add(element);
}
}
return matches;
}
public void pageLoaded(){
components = new ArrayList();
components.add("AbstractField");
}
}
--end
the tml is :
---start---
http://tapestry.apache.org/schema/tapestry_5_3_6.xsd";>
---end---
And when I remove t:mixins="autocomplete" in
and comment out the method onProvideCompletionsFromCompIn
put(String key) in Java code.
Then run the application, the testField could be rendered well.
It seems the autocomplete don't work.
Have I missed on something here?
Thanks in advance.
/Johnny