myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sławek Sobótka <sso...@wp.pl>
Subject inputSuggestAjax - how tu se this stuff?
Date Fri, 29 Sep 2006 10:46:09 GMT
hi

im keep gettin this error mgs when using inpustSuggestAjax:

ERROR org.apache.myfaces.lifecycle.PhaseListenerManager - Exception in 
PhaseListener APPLY_REQUEST_VALUES(2) beforePhase.
java.lang.NullPointerException: null values not allowed
	at org.apache.commons.collections.map.AbstractReferenceMap.
put(AbstractReferenceMap.java:251)
	at org.apache.myfaces.application.jsp.
JspStateManagerImpl$SerializedViewCollection.add(JspStateManagerImpl.
java:717)
	at org.apache.myfaces.application.jsp.JspStateManagerImpl.
saveSerializedViewInServletSession(JspStateManagerImpl.java:493)	
.
.
.

here is my jsp:

<f:view>
<html><body>
<s:inputSuggestAjax id="code" 
suggestedItemsMethod="#{documentSearchBean.getCodesSuggestion}" 
value="#{documentSearchBean.code}" maxSuggestedItems="10" />
</body></html>
</f:view>

here is my backingbean:

public class DocumentSearchBean implements Serializable {
	private String code = "";
	public List<String> getCodesSuggestion(String prefix, Integer 
max){
		List<String> result = new ArrayList<String>();		
		for (int i = 0; i < max; i++) {			
			result.add(prefix + "_" + i);			
		}		
		return result;
	}	
	public String getCode() {return code;}
	public void setCode(String code) {this.code = code;}		
}


what am i do wrong?

----------------------------------------------------
Czy naprawdę chciałbyś być na naszym miejscu? Kampania Parkingowa:
http://klik.wp.pl/?adr=http%3A%2F%2Fadv.reklama.wp.pl%2Fas%2Fd19.html&sid=883



Mime
View raw message