[ https://issues.apache.org/jira/browse/TAP5-747?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12765256#action_12765256 ]
Christophe Cordenier edited comment on TAP5-747 at 10/13/09 3:18 PM: --------------------------------------------------------------------- Hello I am not sure if this can be usefull, but by calling the 'addRootVariable' on the navBuilder in the createAccessors() method, the expression works. private void createAccessors() { createGetRoot(); navBuilder.begin(); String previousReference = "$1"; Class activeType = rootType; Tree node = tree; addRootVariable(navBuilder); The problem is that adding the root variable is only needed when the navigate method needs subexpression. This is patch is too simple. Regards Christophe. was (Author: ccordenier): Hello I am not sure if this can be usefull, but by calling the 'addRootVariable' on the navBuilder in the createAccessors() method, the expression works. {code} private void createAccessors() { createGetRoot(); navBuilder.begin(); String previousReference = "$1"; Class activeType = rootType; Tree node = tree; addRootVariable(navBuilder); {code} Regards Christophe. > Property expression results in spurious error about "root" > ---------------------------------------------------------- > > Key: TAP5-747 > URL: https://issues.apache.org/jira/browse/TAP5-747 > Project: Tapestry 5 > Issue Type: Bug > Components: tapestry-core > Affects Versions: 5.1.0.5 > Reporter: Howard M. Lewis Ship > Priority: Critical > > It's a complex expresssion, with a method invocation, but it should work. > propertyName is part of my page. Don't know what "root" is about! Probably > an error related to generating a method invocation. > # org.apache.tapestry5.ioc.internal.util.TapestryException > Could not convert 'context.itemModel.get(propertyName).label' into a > component parameter binding: Unable to add method > org.apache.tapestry5.beaneditor.PropertyModel > navigate(widen.collective.blocks.pages.LCGridView) to class > $PropertyConduit_121d07fa7a4: [source error] no such class: root > location > classpath:widen/collective/blocks/pages/LCGridView.tml, line 12 > 7 <div> > 8 <t:loop source="context.listedItems" value="item"> > 9 > 10 <div style="{ float: left; border: 2px solid blue; }"> > 11 > 12 <t:loop source="context.itemModel.propertyNames" > value="propertyName"> > 13 ${context.itemModel.get(propertyName).label}: > 14 <t:propertydisplay > 15 model="context.itemModel.get(propertyName)" object="item" /> > 16 </t:loop> > 17 </div> > # javassist.CannotCompileException > [source error] no such class: root > reason > [source error] no such class: root > # javassist.compiler.CompileError > no such class: root > Hide uninteresting stack frames Stack trace > * > javassist.compiler.MemberResolver.searchImports(MemberResolver.java:436) > * > javassist.compiler.MemberResolver.lookupClass(MemberResolver.java:412) > * > javassist.compiler.MemberResolver.lookupClassByJvmName(MemberResolver.java:330) > * javassist.compiler.TypeChecker.atCallExpr(TypeChecker.java:671) > * > javassist.compiler.JvstTypeChecker.atCallExpr(JvstTypeChecker.java:156) > * javassist.compiler.ast.CallExpr.accept(CallExpr.java:45) > * javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:241) > * javassist.compiler.CodeGen.atDeclarator(CodeGen.java:725) > * javassist.compiler.ast.Declarator.accept(Declarator.java:99) > * javassist.compiler.CodeGen.atStmnt(CodeGen.java:350) > * javassist.compiler.ast.Stmnt.accept(Stmnt.java:49) > * javassist.compiler.CodeGen.atStmnt(CodeGen.java:350) > * javassist.compiler.ast.Stmnt.accept(Stmnt.java:49) > * javassist.compiler.CodeGen.atMethodBody(CodeGen.java:291) > * javassist.compiler.Javac.compileBody(Javac.java:222) > * javassist.CtBehavior.setBody(CtBehavior.java:360) > * javassist.CtBehavior.setBody(CtBehavior.java:334) > * > org.apache.tapestry5.ioc.internal.services.ClassFabImpl.addMethod(ClassFabImpl.java:209) > * > org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createAccessors(PropertyConduitSourceImpl.java:405) > * > org.apache.tapestry5.internal.services.PropertyConduitSourceImpl$PropertyConduitBuilder.createInstance(PropertyConduitSourceImpl.java:260) > * > org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.build(PropertyConduitSourceImpl.java:1205) > * > org.apache.tapestry5.internal.services.PropertyConduitSourceImpl.create(PropertyConduitSourceImpl.java:1080) > * > $PropertyConduitSource_121d07fa650.create($PropertyConduitSource_121d07fa650.java) > * > org.apache.tapestry5.internal.bindings.PropBindingFactory.newBinding(PropBindingFactory.java:49) > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.