WG: integration problem with myfaces and pluto
"Luo. Haihua" <[email protected]>
| Newsgroups | gmane.comp.jakarta.pluto.user |
|---|---|
| Message-ID | <CA0CA99A90646247ADC45CB896BD6A856CD14C@SEEDEBREXCHCL.seeburger.de> |
Hi dear all,
I am trying a myfaces' Ajax example using <s:inputSuggestAjax> in my
view.jsp page with Pluto. However, it doesn't work (just not showing any
suggest list when I input one character), since it recognizes only the
whole page, not single part (portlet). Does anybody here have
experiences how to integrate Pluto with MyFaces' Ajax functionalities?
Any help will be appreciated! :-)
InputSuggestAjaxBean.java:
******
package com.seeburger.portlet.processoverview;
import java.util.List;
import java.util.ArrayList;
public class InputSuggestAjaxBean
{
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;
}
}
******
View.jsp:
******
<%@ 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="x"%>
<%@ taglib uri="http://myfaces.apache.org/sandbox" prefix="s"%>
<f:view>
<h:form id="form1">
<style type="text/css">
.ajaxListItem {}
.ajaxList {}
</style>
<f:verbatim>Process Name: </f:verbatim>
<s:inputSuggestAjax id="processSimpleName"
suggestedItemsMethod="#{inputSuggestAjaxBean.getItems}" styleLocation=""
/>
</h:form>
</f:view>
******
Cheers,
Haihua Luo