Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-747

Property expressions that include method invocations that in turn reference properties result in spurious error about "root"

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 5.1.0.5
    • 5.2.0
    • tapestry-core
    • None

    Description

      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.

      1. 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>

      1. javassist.CannotCompileException
        [source error] no such class: root

      reason
      [source error] no such class: root

      1. 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)

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hlship Howard Lewis Ship
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment