Author: piotr.buda
Date: 2008-08-04 04:53:48 -0400 (Mon, 04 Aug 2008)
New Revision: 9876
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java
Log:
Event source is checked and events not from EDT are being bubbled up
Modified:
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java
===================================================================
---
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2008-08-04
08:51:37 UTC (rev 9875)
+++
trunk/sandbox/ui/extendedDataTable/src/main/java/org/richfaces/component/UIExtendedDataTable.java 2008-08-04
08:53:48 UTC (rev 9876)
@@ -74,29 +74,26 @@
}
public void queueEvent(FacesEvent event) {
- //TODO nick - queued events can be bubbled from nested component and not generated
- // by the table itself. Please check source of the event!
- if (event instanceof AjaxEvent) {
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- } else if (event instanceof DragDropEvent) {
- new AjaxEvent(this).queue();
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- // event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- // new AjaxEvent(this).queue();
- } else if (event instanceof ChangeColumnVisibilityEvent) {
- new AjaxEvent(this).queue();
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- } else if (event instanceof ColumnResizeEvent) {
- // new AjaxEvent(this).queue();
- event.setPhaseId(PhaseId.RENDER_RESPONSE);
- } else if (event instanceof ExtTableSortEvent) {
- new AjaxEvent(this).queue();
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- } else if (event instanceof ExtTableFilterEvent) {
- new AjaxEvent(this).queue();
- event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
- }
- super.queueEvent(event);
+ if(event.getSource() instanceof UIExtendedDataTable) {
+ if (event instanceof AjaxEvent) {
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ } else if (event instanceof DragDropEvent) {
+ new AjaxEvent(this).queue();
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ } else if (event instanceof ChangeColumnVisibilityEvent) {
+ new AjaxEvent(this).queue();
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ } else if (event instanceof ColumnResizeEvent) {
+ event.setPhaseId(PhaseId.RENDER_RESPONSE);
+ } else if (event instanceof ExtTableSortEvent) {
+ new AjaxEvent(this).queue();
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ } else if (event instanceof ExtTableFilterEvent) {
+ new AjaxEvent(this).queue();
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ }
+ }
+ super.queueEvent(event);
}
public Iterator<UIColumn> getSortedColumns() {
Show replies by date