Author: abelevich
Date: 2007-10-24 06:11:10 -0400 (Wed, 24 Oct 2007)
New Revision: 3494
Modified:
trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
Log:
don't add parameters if name==null
Modified:
trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java
===================================================================
---
trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2007-10-24
08:34:35 UTC (rev 3493)
+++
trunk/ui/datascroller/src/main/java/org/richfaces/renderkit/html/DataScrollerRenderer.java 2007-10-24
10:11:10 UTC (rev 3494)
@@ -34,6 +34,7 @@
import javax.faces.context.ResponseWriter;
import javax.faces.event.PhaseId;
+import org.ajax4jsf.Messages;
import org.ajax4jsf.javascript.JSFunction;
import org.ajax4jsf.renderkit.AjaxRendererUtils;
import org.ajax4jsf.renderkit.HeaderResourcesRendererBase;
@@ -252,7 +253,8 @@
return context.getExternalContext().getRequestParameterMap();
}
- protected Map getParameters(UIComponent component){
+ //get UIParameter's Map
+ protected Map getParameters(FacesContext context, UIComponent component){
Map parameters = new HashMap();
if(component instanceof UIDatascroller){
@@ -262,7 +264,10 @@
UIComponent child = (UIComponent) iterator.next();
if(child instanceof UIParameter) {
UIParameter param = (UIParameter)child;
- parameters.put(param.getName(), param.getValue());
+ String name = param.getName();
+ if (name != null) {
+ parameters.put(name, param.getValue());
+ }
}
}
}
@@ -281,7 +286,7 @@
Map parameters = (Map) eventOptions.get("parameters");
parameters.put(scroller.getClientId(context), value);
- Map params = getParameters(component);
+ Map params = getParameters(context,component);
if(!params.isEmpty()){
parameters.putAll(params);
}
Show replies by date