Author: nbelaevski
Date: 2010-12-17 10:01:11 -0500 (Fri, 17 Dec 2010)
New Revision: 20650
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeNodeRendererBase.java
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/tree.ecss
trunk/ui/iteration/ui/src/main/templates/treeNode.template.xml
Log:
https://issues.jboss.org/browse/RF-10034
Modified:
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeNodeRendererBase.java
===================================================================
---
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeNodeRendererBase.java 2010-12-17
14:36:40 UTC (rev 20649)
+++
trunk/ui/iteration/ui/src/main/java/org/richfaces/renderkit/TreeNodeRendererBase.java 2010-12-17
15:01:11 UTC (rev 20650)
@@ -53,7 +53,7 @@
private static final String TRIGGER_NODE_AJAX_UPDATE =
"__TRIGGER_NODE_AJAX_UPDATE";
- private static final String LOADING_FACET_NAME = "loading";
+ private static final String HANDLE_LOADING_FACET_NAME = "handleLoading";
@Override
public void decode(FacesContext context, UIComponent component) {
@@ -171,7 +171,7 @@
renderingContext.addHandlers(treeNode);
}
- protected UIComponent getLoadingFacetIfApplicable(UIComponent component) {
+ protected UIComponent getHandleLoadingFacetIfApplicable(UIComponent component) {
AbstractTreeNode treeNode = (AbstractTreeNode) component;
AbstractTree tree = treeNode.findTreeComponent();
@@ -180,11 +180,15 @@
return null;
}
- UIComponent facet = treeNode.getFacet(LOADING_FACET_NAME);
+ UIComponent facet = treeNode.getFacet(HANDLE_LOADING_FACET_NAME);
if (facet == null) {
- facet = tree.getFacet(LOADING_FACET_NAME);
+ facet = tree.getFacet(HANDLE_LOADING_FACET_NAME);
}
- return facet;
+ if (facet != null && facet.isRendered()) {
+ return facet;
+ }
+
+ return null;
}
}
Modified:
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/tree.ecss
===================================================================
---
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/tree.ecss 2010-12-17
14:36:40 UTC (rev 20649)
+++
trunk/ui/iteration/ui/src/main/resources/META-INF/resources/org.richfaces/tree.ecss 2010-12-17
15:01:11 UTC (rev 20650)
@@ -80,15 +80,15 @@
display: none;
}
-.rf-trn-ldn-fct {
+.rf-trn-hnd-ldn-fct {
cursor: default;
display: none;
}
-.rf-trn-ldn > .rf-trn-ldn-fct {
+.rf-trn-ldn > .rf-trn-hnd-ldn-fct {
display: inline-block;
}
-.rf-trn-ldn > .rf-trn-ldn-fct + .rf-trn-hnd {
+.rf-trn-ldn > .rf-trn-hnd-ldn-fct + .rf-trn-hnd {
display: none;
}
\ No newline at end of file
Modified: trunk/ui/iteration/ui/src/main/templates/treeNode.template.xml
===================================================================
--- trunk/ui/iteration/ui/src/main/templates/treeNode.template.xml 2010-12-17 14:36:40 UTC
(rev 20649)
+++ trunk/ui/iteration/ui/src/main/templates/treeNode.template.xml 2010-12-17 15:01:11 UTC
(rev 20650)
@@ -27,10 +27,10 @@
<div class="#{concatClasses('rf-trn',
component.attributes['styleClass'], tree.attributes['nodeClass'])}"
cdk:passThroughWithExclusions="">
- <cdk:object name="loadingFacet" type="UIComponent"
value="#{getLoadingFacetIfApplicable(component)}" />
+ <cdk:object name="loadingFacet" type="UIComponent"
value="#{getHandleLoadingFacetIfApplicable(component)}" />
<c:if test="#{not empty loadingFacet and
loadingFacet.isRendered()}">
- <span class="rf-trn-ldn-fct">
+ <span class="rf-trn-hnd-ldn-fct">
<cdk:call>
loadingFacet.encodeAll(facesContext);
</cdk:call>