Author: nbelaevski
Date: 2007-08-28 17:48:48 -0400 (Tue, 28 Aug 2007)
New Revision: 2553
Modified:
trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-700 minor updates
Modified: trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2007-08-28 19:18:34
UTC (rev 2552)
+++ trunk/ui/tree/src/main/java/org/richfaces/component/UITree.java 2007-08-28 21:48:48
UTC (rev 2553)
@@ -38,7 +38,6 @@
import org.ajax4jsf.component.AjaxComponent;
import org.ajax4jsf.component.UIDataAdaptor;
-import org.ajax4jsf.context.AjaxContext;
import org.ajax4jsf.event.AjaxEvent;
import org.ajax4jsf.model.DataComponentState;
import org.ajax4jsf.model.DataVisitor;
@@ -53,8 +52,6 @@
import org.richfaces.component.state.events.ExpandAllCommandEvent;
import org.richfaces.component.state.events.ExpandNodeCommandEvent;
import org.richfaces.component.state.events.TreeStateCommandEvent;
-import org.richfaces.event.AjaxExpandedEvent;
-import org.richfaces.event.AjaxSelectedEvent;
import org.richfaces.event.DragEvent;
import org.richfaces.event.DragListener;
import org.richfaces.event.DropEvent;
@@ -495,17 +492,6 @@
setSelected();
}
- if (event instanceof AjaxSelectedEvent || event instanceof AjaxExpandedEvent) {
- Object key = getRowKey();
- if (key != null) {
- this.addRequestKey(key);
- }
-
- FacesContext facesContext = getFacesContext();
- AjaxContext ajaxContext = AjaxContext.getCurrentInstance(facesContext);
- ajaxContext.getAjaxAreasToRender().add(this.getClientId(facesContext));
- }
-
// fire node events
TreeEvents.invokeListenerBindings(this, event, getFacesContext());
Modified: trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-08-28
19:18:34 UTC (rev 2552)
+++ trunk/ui/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-08-28
21:48:48 UTC (rev 2553)
@@ -425,16 +425,16 @@
} else {
treeClientId = tree.getNodeFacet().getClientId(context);
}
- if (ids.contains(tree.getClientId(context)) || ids.contains(id)) {
- String treeChildrenId = treeClientId + NamingContainer.SEPARATOR_CHAR +
"childs";
- writeContent(context, tree, key);
- encodeScripts = true;
- renderedAreas.add(treeClientId);
- encodedAreaIds.add(treeClientId);
- renderedAreas.add(treeChildrenId);
- //encodedAreaIds.add(id+":childs");
- }
+ String treeChildrenId = treeClientId + NamingContainer.SEPARATOR_CHAR +
"childs";
+
+ writeContent(context, tree, key);
+ encodeScripts = true;
+ renderedAreas.add(treeClientId);
+ encodedAreaIds.add(treeClientId);
+
+ renderedAreas.add(treeChildrenId);
+ //encodedAreaIds.add(id+":childs");
}
//ajaxKeys.clear();
}
@@ -564,12 +564,10 @@
public void writeContent(final FacesContext context, final UITree input,
TreeRowKey key) throws IOException {
- final ResponseWriter writer = context.getResponseWriter();
-
// simple flag can be used here because
// we cannot jump more than one level down until next node
// when rendering
- final Flag droppedDownToLevelFlag = new Flag();
+ Flag droppedDownToLevelFlag = new Flag();
TreeRowKey rowKey = (TreeRowKey) key;