请教:tapestry4.1中的Autocompleter的用法

用tapestry4.1中的dojo的Autocompleter组件时,
HTML代码:
  1. <html jwcid="@Shell" title="test" debugEnabled="true">
  2. <head>
  3. <!---->head>
  4. <body jwcid="@Body">
  5. <span jwcid="@Autocompleter" model="ognl:model" value="ognl:select"/>
  6. <!---->body>
  7. <!---->html>
页面类如下,
java 代码
  1. package autoCompleter.test;
  2. import java.util.Arrays;
  3. import org.apache.tapestry.dojo.form.DefaultAutocompleteModel;
  4. import org.apache.tapestry.dojo.form.IAutocompleteModel;
  5. import org.apache.tapestry.event.PageBeginRenderListener;
  6. import org.apache.tapestry.event.PageEvent;
  7. import org.apache.tapestry.html.BasePage;
  8. public abstract class AutoCompleter extends BasePage
  9. {
  10. public IAutocompleteModel model = null;
  11. public IAutocompleteModel getModel() {
  12. if (model == null) {
  13. model = new DefaultAutocompleteModel(Arrays.asList("aaaa","bbbb","dddd"), "id", "name");
  14. }
  15. return model;
  16. }
  17. public abstract String getSelect();
  18. public abstract String getId();
  19. public abstract String getName();
  20. }
但显示不了列表内容,郁闷了好几天都解决不了,有谁可以告诉我IAutocompleteModel的用法

你可能感兴趣的:(apache,html,json,tapestry,dojo)