Hi Lists,
I want to test the simple sandbox example for inputSuggestAjax. But when I input sth. in the input field, an error occurs in the web page in firefox: document.getElementById("jsf_tree_64") has no properties. Any ideas or comment why it happens?
I am using myfaces 1.1.1, Jboss 3.2.6 and Pluto for portlet
my view.jsp is used to call the inputSuggestAjax:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/extensions" prefix="t"%>
<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
<f:view>
<h:form>
<style type="text/css">
.ajaxListItem {}
.ajaxList {}
</style>
<h:panelGrid columns="2">
<h:outputText value="default suggest"/>
<s:inputSuggestAjax suggestedItemsMethod="#{myInputSuggestAjax.getItems}" styleLocation="" />
</h:panelGrid>
</h:form>
</f:view>
and my bean is written in MyInputSuggestAjaxBean.java:
package com.seeburger.portlet.processoverview;
import java.util.List;
import java.util.ArrayList;
/**
* @jsf.bean name = "myInputSuggestAjax"
* scope = "request"
*
*/
public class MyInputSuggestAjaxBean
{
public List getItems(String prefix)
{
List li = new ArrayList();
li.add(prefix+1);
li.add(prefix+2);
li.add(prefix+3);
li.add(prefix+4);
li.add(prefix+5);
li.add(prefix+6);
return li;
}
public List getItems(String prefix, Integer maxSize) {
List li = new ArrayList();
for(int i = 0; i < maxSize.intValue(); i++) {
li.add(prefix+ " " +(i+1));
}
return li;
}
}
Thank you so much!
Haihua

