Author: nbelaevski
Date: 2008-06-17 19:48:59 -0400 (Tue, 17 Jun 2008)
New Revision: 9086
Modified:
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/component/UIDataFltrSlider.java
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/event/DataFilterSliderAdapter.java
Log:
http://jira.jboss.com/jira/browse/RF-3719
Modified:
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/component/UIDataFltrSlider.java
===================================================================
---
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/component/UIDataFltrSlider.java 2008-06-17
23:16:38 UTC (rev 9085)
+++
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/component/UIDataFltrSlider.java 2008-06-17
23:48:59 UTC (rev 9086)
@@ -74,20 +74,21 @@
}
public void broadcast(FacesEvent event) throws AbortProcessingException {
- super.broadcast(event);
if (event instanceof DataFilterSliderEvent){
- FacesContext context = FacesContext.getCurrentInstance();
- AjaxRendererUtils.addRegionByName(context, this, this.getId());
- String forAttr = this.getFor();
- RendererUtils rendUtil = RendererUtils.getInstance();
- AjaxRendererUtils.addRegionByName(context, this,
rendUtil.correctForIdReference(forAttr, this));
-
- if(getSliderListeners().length < 1){
- addSliderListener(new DataFilterSliderAdapter(getSliderListener()));
- }
- }
+ FacesContext context = FacesContext.getCurrentInstance();
+ AjaxRendererUtils.addRegionByName(context, this, this.getId());
+ String forAttr = this.getFor();
+ RendererUtils rendUtil = RendererUtils.getInstance();
+ AjaxRendererUtils.addRegionByName(context, this,
rendUtil.correctForIdReference(forAttr, this));
+
+ if(getSliderListeners().length < 1){
+ addSliderListener(new DataFilterSliderAdapter(getSliderListener()));
+ }
+ }
+ super.broadcast(event);
+
}
public void processDecodes(FacesContext context) {
Modified:
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/event/DataFilterSliderAdapter.java
===================================================================
---
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/event/DataFilterSliderAdapter.java 2008-06-17
23:16:38 UTC (rev 9085)
+++
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/event/DataFilterSliderAdapter.java 2008-06-17
23:48:59 UTC (rev 9086)
@@ -23,8 +23,8 @@
import javax.faces.component.StateHolder;
import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
import javax.faces.el.MethodBinding;
-import javax.faces.context.FacesContext;
/**
* @author Wesley Hales
@@ -59,7 +59,9 @@
*/
public void processSlider(DataFilterSliderEvent event) {
FacesContext context = FacesContext.getCurrentInstance();
- sliderMethod.invoke(context, new Object[]{event});
+ if (sliderMethod != null) {
+ sliderMethod.invoke(context, new Object[]{event});
+ }
}
/**