X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=server%2Fplugins%2Forg.argeo.jcr.ui.explorer%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fjcr%2Fui%2Fexplorer%2Fmodel%2FSingleJcrNode.java;h=1da156a9ba2477f690cf4604fd5517f7ae9f8495;hb=2c4852dcd20d4cde88776c527ae935f242ae1e77;hp=03ac5222661cd4771d2435d6702f52ed5377a3ea;hpb=c0b7b3f9d1781d074ab35d24017042fa9415e1e4;p=lgpl%2Fargeo-commons.git diff --git a/server/plugins/org.argeo.jcr.ui.explorer/src/main/java/org/argeo/jcr/ui/explorer/model/SingleJcrNode.java b/server/plugins/org.argeo.jcr.ui.explorer/src/main/java/org/argeo/jcr/ui/explorer/model/SingleJcrNode.java index 03ac52226..1da156a9b 100644 --- a/server/plugins/org.argeo.jcr.ui.explorer/src/main/java/org/argeo/jcr/ui/explorer/model/SingleJcrNode.java +++ b/server/plugins/org.argeo.jcr.ui.explorer/src/main/java/org/argeo/jcr/ui/explorer/model/SingleJcrNode.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2007-2012 Mathieu Baudier + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.argeo.jcr.ui.explorer.model; import javax.jcr.Node; @@ -65,7 +80,7 @@ public class SingleJcrNode extends TreeParent implements UiNode { } /** - * Override normal behaviour to initialize children only when first + * Override normal behavior to initialize children only when first * requested */ @Override @@ -92,7 +107,10 @@ public class SingleJcrNode extends TreeParent implements UiNode { @Override public boolean hasChildren() { try { - return node.hasNodes(); + if (node.getSession().isLive()) + return node.hasNodes(); + else + return false; } catch (RepositoryException re) { throw new ArgeoException( "Unexpected error while checking children node existence",