Author: andrei_exadel
Date: 2008-02-29 06:05:05 -0500 (Fri, 29 Feb 2008)
New Revision: 6440
Modified:
trunk/ui/progressBAR/src/main/config/component/progressBar.xml
trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
Log:
fix problem with call of actionListener
Modified: trunk/ui/progressBAR/src/main/config/component/progressBar.xml
===================================================================
--- trunk/ui/progressBAR/src/main/config/component/progressBar.xml 2008-02-29 10:35:27 UTC
(rev 6439)
+++ trunk/ui/progressBAR/src/main/config/component/progressBar.xml 2008-02-29 11:05:05 UTC
(rev 6440)
@@ -100,7 +100,12 @@
</property>
<property hidden="true">
<name>actionExpression</name>
- </property>
+ </property>
+ <property hidden="true">
+ <name>action</name>
+ <classname>javax.el.MethodExpression</classname>
+ <description>The action method binding expression.</description>
+ </property>
<property>
<name>onsubmit</name>
<classname>java.lang.String</classname>
Modified: trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java
===================================================================
---
trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-02-29
10:35:27 UTC (rev 6439)
+++
trunk/ui/progressBAR/src/main/java/org/richfaces/component/UIProgressBar.java 2008-02-29
11:05:05 UTC (rev 6440)
@@ -14,6 +14,8 @@
import javax.faces.context.FacesContext;
import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ActionListener;
import javax.faces.event.FacesEvent;
import javax.servlet.http.HttpServletRequest;
@@ -51,19 +53,25 @@
* @see
org.ajax4jsf.component.AjaxActionComponent#broadcast(javax.faces.event.FacesEvent)
*/
public void broadcast(FacesEvent event) throws AbortProcessingException {
-
- if (event instanceof AjaxEvent) {
- FacesContext facesContext = FacesContext.getCurrentInstance();
- AjaxContext ajaxContext = AjaxContextImpl
- .getCurrentInstance(facesContext);
- HttpServletRequest request = (HttpServletRequest) facesContext
- .getExternalContext().getRequest();
- Map params = request.getParameterMap();
- String clientId = this.getClientId(facesContext);
- if (!params.containsKey(clientId)) {
- return;
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ AjaxContext ajaxContext = AjaxContextImpl
+ .getCurrentInstance(facesContext);
+ HttpServletRequest request = (HttpServletRequest) facesContext
+ .getExternalContext().getRequest();
+ Map params = request.getParameterMap();
+ String clientId = this.getClientId(facesContext);
+
+ if (!params.containsKey(clientId)) {
+ return;
+ }
+
+ if (event instanceof ActionEvent) {
+ ActionListener listeners[] = getActionListeners();
+ for (ActionListener l : listeners) {
+ l.processAction((ActionEvent) event);
}
+ } else if (event instanceof AjaxEvent) {
if (!params.containsKey(FORCE_PERCENT_PARAM)
&& params.containsKey(PERCENT_PARAM)) {
@@ -87,7 +95,7 @@
}
}
-
+
/**
* Returns ajax response data
*
Modified:
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java
===================================================================
---
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-02-29
10:35:27 UTC (rev 6439)
+++
trunk/ui/progressBAR/src/main/java/org/richfaces/renderkit/AbstractProgressBarRenderer.java 2008-02-29
11:05:05 UTC (rev 6440)
@@ -54,6 +54,7 @@
@Override
protected void doDecode(FacesContext facesContext, UIComponent uiComponent) {
new AjaxEvent(uiComponent).queue();
+ uiComponent.queueEvent(new ActionEvent(uiComponent));
}
/**
Show replies by date