myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Schofield <sean.schofi...@gmail.com>
Subject Re: tree2 with empty TreeNode as base exception
Date Fri, 25 Mar 2005 14:20:55 GMT
Rob, did you figure this one out yet?  

sean


On Thu, 24 Mar 2005 16:47:42 -0500, Rob Decker <rob@objectsource.org> wrote:
> 
> When I have an empty tree:
> 
> treebacker.getTreeData {
>   return new TreeNodeBase("branch", "root", "0", true);
> }
> 
> I get this exception:
> 
> [24 Mar 2005 16:42:46,806] ERROR <org.apache.myfaces.el.ValueBindingImpl ->
> ValueBindingImpl.java:457> [Thread-17] -
>       Cannot get value for expression '#{treeBacker.treeData}'
> javax.faces.el.ReferenceSyntaxException: Cannot convert index to int for base
> com.gsk.scmm.vis.test.TreeBacker and index treeData
>       at org.apache.myfaces.el.ELParserHelper.coerceToIntegerWrapper
> (ELParserHelper.java:418)
>       at org.apache.myfaces.el.ELParserHelper.toIndex(ELParserHelper.java:440)
>       at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate
> (ELParserHelper.java:541)
>       at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
>       at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:441)
>       at org.apache.myfaces.custom.tree2.UITreeData.getValue(UITreeData.java:229)
>       at org.apache.myfaces.custom.tree2.HtmlTreeRenderer.encodeChildren
> (HtmlTreeRenderer.java:160)
>       at javax.faces.component.UIComponentBase.encodeChildren
> (UIComponentBase.java:320)
> 
> Can there be a way to say 'There are no items', i.e. a custom message instead?
> 
> --
> Rob
> 
> @objectsource.org
> 
>

Mime
View raw message