Author: abelevich
Date: 2007-10-22 10:39:40 -0400 (Mon, 22 Oct 2007)
New Revision: 3467
Modified:
trunk/framework/impl/src/main/java/org/richfaces/component/UISwitchablePanel.java
Log:
RF-1128 rendenderResponse if ActionEvent occure and component immediate
Modified:
trunk/framework/impl/src/main/java/org/richfaces/component/UISwitchablePanel.java
===================================================================
---
trunk/framework/impl/src/main/java/org/richfaces/component/UISwitchablePanel.java 2007-10-22
14:38:03 UTC (rev 3466)
+++
trunk/framework/impl/src/main/java/org/richfaces/component/UISwitchablePanel.java 2007-10-22
14:39:40 UTC (rev 3467)
@@ -28,6 +28,7 @@
import javax.faces.context.FacesContext;
import javax.faces.el.ValueBinding;
import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
import javax.faces.event.FacesEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.ValueChangeEvent;
@@ -97,6 +98,14 @@
}
public void broadcast(FacesEvent facesEvent) throws AbortProcessingException {
+
+ if(facesEvent instanceof ActionEvent){
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ if(isImmediate()){
+ facesContext.renderResponse();
+ }
+ }
+
if (facesEvent instanceof SwitchablePanelSwitchEvent) {
if (isRendered()) {
FacesContext facesContext = FacesContext.getCurrentInstance();
@@ -126,9 +135,6 @@
this,
this.getId());
}
- if(isImmediate()){
- facesContext.renderResponse();
- }
}
} else /* component should throw IllegalArgumentException for unknown events - RF-30 */
{
super.broadcast(facesEvent);
@@ -174,7 +180,7 @@
//when immediate
//
// set context.renderResponse() in broadcast method if component is immediate
-// and SwitchablePanelSwitchEvent is occured (RF-1032)
+// and ActionEvent is occured (RF-1032)
// context.renderResponse();
}
} catch (RuntimeException e) {