getListSource() returns a ListSource object, which is one of our own
interfaces. It has a getTotal() method that returns an int, which is
what I expect to have called in this case.

So the problem appears to be that it thinks getListSource() returns a
java.util.List, then it tries to call the get() method on that.

But the definition on BaseListContainerModel for getListSource() is
pretty clear:
public abstract ListSource getListSource();

ListSource does not extend any other interfaces so I'm unclear as to why
it would think it was a List.

-----Original Message-----
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 26, 2007 12:05 PM
To: Tapestry users
Subject: Re: OGNL AND errors

Aha......So what kind of interfaces does your listSource implement?

On 3/26/07, Ben Dotte <[EMAIL PROTECTED]> wrote:
> Aha! "count" is a parameter, it is what is being passed in for count
> that is the problem. Here is the template portion:
>
> <showAll jwcid="@ShowAll"
> count="ognl:components.doxList.model.listSource.total" title=""
> pageName="MyDocuments" >
>   <div class="shadeIconIndent">
>     <br/>
>     <myDocs jwcid="[EMAIL PROTECTED]"
> allowItemsPerPageSelection="false"/>
>   </div>
> </showAll>
>
> So the "components.doxList.model.listSource.total" is what isn't being
> evaluated properly. Looking closer at the stack trace I see how it is
> expanding the ognl:
>
> Unable to parse OGNL expression
> 'components.doxList.model.listSource.total': Error compiling
expression
> on object [EMAIL PROTECTED] with expression node
> components.doxList.model.listSource.total getter body: { return  ($w)
>
(((java.util.List)((collective.listcontainer.model.BaseListContainerMode
>
l)((collective.mb.ui.components.MyDocumentsList)(($BuilderAccount_106)$2
>
).getComponents().get("doxList")).getModel()).getListSource()).get(total
> ));} setter body: null
>
> Notice it is calling getListSource().get(total). This should be
> getListSource().getTotal() (and it worked this way in 2.6).
>
> -----Original Message-----
> From: Ben Dotte [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 26, 2007 11:16 AM
> To: Tapestry users
> Subject: RE: OGNL AND errors
>
> I upgraded javassist to 3.4.ga so it should be the same version. I
just
> verified that is the one on the build path too. I'm fairly certain I
got
> all of our dependencies up to date with the versions listed on the
> Tapestry site but I'll double check that as well.
>
> -----Original Message-----
> From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 26, 2007 11:12 AM
> To: Tapestry users
> Subject: Re: OGNL AND errors
>
> What version of javassist are you using? In my test suite I've created
> a similar count > 0 expression for every conceivable type / object
> combination I can think of with no failure. ...So I'm either not
> correctly re-creating the exact object structure you have or we are on
> different version of javassist. ..It should be 3.4ga (something like
> that)
>
> On 3/26/07, Ben Dotte <[EMAIL PROTECTED]> wrote:
> > I got the latest OGNL snapshot from 3-24 but the "ognl:count > 0"
> > expression still isn't working. I get a different exception however:
> >
> > Unable to parse OGNL expression 'count > 0': Error compiling
> expression
> > on object [EMAIL PROTECTED]/$ShowAll] with
> expression
> > node count > 0 getter body: null setter body: null
> >
> > Nested Exception:
> > caused by  javassist.compiler.NoFieldException: no such field: total
> > javassist.compiler.TypeChecker#fieldAccess (TypeChecker.java:812)
> > javassist.compiler.TypeChecker#atFieldRead (TypeChecker.java:770)
> > javassist.compiler.TypeChecker#atMember (TypeChecker.java:920)
> > javassist.compiler.JvstTypeChecker#atMember
(JvstTypeChecker.java:65)
> > javassist.compiler.ast.Member#accept (Member.java:38)
> > javassist.compiler.JvstTypeChecker#atMethodArgs
> > (JvstTypeChecker.java:220)
> > javassist.compiler.TypeChecker#atMethodCallCore
(TypeChecker.java:702)
> > javassist.compiler.TypeChecker#atCallExpr (TypeChecker.java:681)
> > javassist.compiler.JvstTypeChecker#atCallExpr
> (JvstTypeChecker.java:156)
> > javassist.compiler.ast.CallExpr#accept (CallExpr.java:45)
> > javassist.compiler.JvstTypeChecker#atCastToWrapper
> > (JvstTypeChecker.java:125)
> > javassist.compiler.JvstTypeChecker#atCastExpr
> (JvstTypeChecker.java:97)
> > javassist.compiler.ast.CastExpr#accept (CastExpr.java:54)
> > javassist.compiler.CodeGen#doTypeCheck (CodeGen.java:235)
> > javassist.compiler.CodeGen#compileExpr (CodeGen.java:222)
> > javassist.compiler.CodeGen#atReturnStmnt2 (CodeGen.java:591)
> > javassist.compiler.JvstCodeGen#atReturnStmnt (JvstCodeGen.java:424)
> > javassist.compiler.CodeGen#atStmnt (CodeGen.java:356)
> > javassist.compiler.ast.Stmnt#accept (Stmnt.java:49)
> > javassist.compiler.CodeGen#atStmnt (CodeGen.java:344)
> > javassist.compiler.ast.Stmnt#accept (Stmnt.java:49)
> > javassist.compiler.CodeGen#atMethodBody (CodeGen.java:285)
> > javassist.compiler.Javac#compileBody (Javac.java:212)
> > javassist.CtBehavior#setBody (CtBehavior.java:341)
> > javassist.CtBehavior#setBody (CtBehavior.java:316)
> > org.apache.tapestry.enhance.ClassFabImpl#addMethod
> > (ClassFabImpl.java:272)
> >
>
org.apache.tapestry.services.impl.HiveMindExpressionCompiler#compileExpr
> > ession (HiveMindExpressionCompiler.java:221)
> > ognl.OgnlRuntime#compileExpression (OgnlRuntime.java:388)
> > ognl.Ognl#compileExpression (Ognl.java:123)
> > org.apache.tapestry.services.impl.ExpressionCacheImpl#parse
> > (ExpressionCacheImpl.java:129)
> >
>
org.apache.tapestry.services.impl.ExpressionCacheImpl#getCompiledExpress
> > ion (ExpressionCacheImpl.java:91)
> > $ExpressionCache_1118ef72fb5#getCompiledExpression
> > ($ExpressionCache_1118ef72fb5.java:-1)
> > org.apache.tapestry.binding.ExpressionBinding#resolveExpression
> > (ExpressionBinding.java:120)
> > org.apache.tapestry.binding.ExpressionBinding#getObject
> > (ExpressionBinding.java:111)
> > org.apache.tapestry.binding.AbstractBinding#getObject
> > (AbstractBinding.java:84)
> > org.apache.tapestry.enhance.EnhanceUtils#toInt
(EnhanceUtils.java:204)
> > $ShowAll_179#getCount ($ShowAll_179.java:-1)
> > ...
> >
> > -----Original Message-----
> > From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
> > Sent: Friday, March 23, 2007 2:44 PM
> > To: Tapestry users
> > Subject: Re: OGNL AND errors
> >
> > Fix should be finished deploying in the next few minutes.
> >
> > On 3/23/07, Ben Dotte <[EMAIL PROTECTED]> wrote:
> > > Excellent thanks, that seems to have fixed the AND issue. Here's
one
> > > that still isn't working:
> > >
> > > <anyItems jwcid="@If" condition="ognl:count > 0">
> > >
> > > @Parameter(required = true)
> > > public abstract int getCount();
> > > public abstract void setCount(int count);
> > >
> > > This error occurred in the file javassist.compiler.CompileError:
> > missing
> > > member name
> > > This error occurred in the file ShowAll.html on line 7
> > >
> > > Tapestry error message: Unable to parse OGNL expression 'count >
0':
> > > Error compiling expression on object
> > > [EMAIL PROTECTED]/$ShowAll] with expression
node
> > > count > 0 getter body: null setter body: null
> > >
> > > Nested Stack Trace:
> > >
> > > caused by  javassist.compiler.CompileError: missing member name
> > > javassist.compiler.Parser#parsePostfix (Parser.java:1068)
> > > javassist.compiler.Parser#parseUnaryExpr (Parser.java:887)
> > > javassist.compiler.Parser#parseBinaryExpr (Parser.java:774)
> > > javassist.compiler.Parser#parseConditionalExpr (Parser.java:718)
> > > javassist.compiler.Parser#parseExpression (Parser.java:698)
> > > javassist.compiler.Parser#parseArgumentList (Parser.java:1329)
> > > javassist.compiler.Parser#parseMethodCall (Parser.java:1177)
> > > javassist.compiler.Parser#parsePostfix (Parser.java:1034)
> > > javassist.compiler.Parser#parseCast (Parser.java:920)
> > > javassist.compiler.Parser#parseUnaryExpr (Parser.java:885)
> > > javassist.compiler.Parser#parseBinaryExpr (Parser.java:774)
> > > javassist.compiler.Parser#parseConditionalExpr (Parser.java:718)
> > > javassist.compiler.Parser#parseExpression (Parser.java:698)
> > > javassist.compiler.Parser#parsePrimaryExpr (Parser.java:1243)
> > > javassist.compiler.Parser#parsePostfix (Parser.java:1029)
> > > javassist.compiler.Parser#parseCast (Parser.java:920)
> > > javassist.compiler.Parser#parseUnaryExpr (Parser.java:885)
> > > javassist.compiler.Parser#parseCast (Parser.java:917)
> > > javassist.compiler.Parser#parseUnaryExpr (Parser.java:885)
> > > javassist.compiler.Parser#parseBinaryExpr (Parser.java:774)
> > > javassist.compiler.Parser#parseConditionalExpr (Parser.java:718)
> > > javassist.compiler.Parser#parseExpression (Parser.java:698)
> > > javassist.compiler.Parser#parseReturn (Parser.java:506)
> > > javassist.compiler.Parser#parseStatement (Parser.java:268)
> > > javassist.compiler.Parser#parseBlock (Parser.java:288)
> > > javassist.compiler.Parser#parseStatement (Parser.java:242)
> > > javassist.compiler.Javac#compileBody (Javac.java:203)
> > > javassist.CtBehavior#setBody (CtBehavior.java:341)
> > > javassist.CtBehavior#setBody (CtBehavior.java:316)
> > > org.apache.tapestry.enhance.ClassFabImpl#addMethod
> > > (ClassFabImpl.java:272)
> > >
> >
>
org.apache.tapestry.services.impl.HiveMindExpressionCompiler#compileExpr
> > > ession (HiveMindExpressionCompiler.java:221)
> > > ognl.OgnlRuntime#compileExpression (OgnlRuntime.java:388)
> > > ognl.Ognl#compileExpression (Ognl.java:123)
> > > org.apache.tapestry.services.impl.ExpressionCacheImpl#parse
> > > (ExpressionCacheImpl.java:129)
> > >
> >
>
org.apache.tapestry.services.impl.ExpressionCacheImpl#getCompiledExpress
> > > ion (ExpressionCacheImpl.java:91)
> > > $ExpressionCache_111801dfeec#getCompiledExpression
> > > ($ExpressionCache_111801dfeec.java:-1)
> > > org.apache.tapestry.binding.ExpressionBinding#resolveExpression
> > > (ExpressionBinding.java:120)
> > > org.apache.tapestry.binding.ExpressionBinding#getObject
> > > (ExpressionBinding.java:111)
> > > org.apache.tapestry.binding.AbstractBinding#getObject
> > > (AbstractBinding.java:84)
> > > org.apache.tapestry.enhance.EnhanceUtils#toInt
> (EnhanceUtils.java:204)
> > > $ShowAll_179#getCount ($ShowAll_179.java:-1)
> > > ...
> > >
> > > -----Original Message-----
> > > From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
> > > Sent: Friday, March 23, 2007 12:40 PM
> > > To: Tapestry users
> > > Subject: Re: OGNL AND errors
> > >
> > > This particular issue should be fixed && deployed now. Feel free
to
> > > report any others...It only took so long because I discovered a
> > > critical section of code that hadn't had the same kind of
> refactoring
> > > that others had gone through recently..If similar new bugs come up
> > > they should be quicker to fix now.
> > >
> > > On 3/23/07, Ben Dotte <[EMAIL PROTECTED]> wrote:
> > > > Awesome, I really appreciate it. The simplest one is probably
the
> > last
> > > > one. It is just a String parameter on a component.
> > > >
> > > > <pageTitle jwcid="@If" condition="ognl:title != null &&
> > title.length()
> > > >
> > > > 0">
> > > >         <span class="title"><title jwcid="@Insert"
> > > > mode="ognl:@[EMAIL PROTECTED]"
> > > > value="ognl:title" /></span>
> > > > </pageTitle>
> > > >
> > > > Java:
> > > > @Parameter
> > > > public abstract String getTitle();
> > > > public abstract void setTitle(String title);
> > > >
> > > > -----Original Message-----
> > > > From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
> > > > Sent: Friday, March 23, 2007 10:16 AM
> > > > To: Tapestry users
> > > > Subject: Re: OGNL AND errors
> > > >
> > > > Well I'm going in to fix one other tiny bug this morning, so
I'll
> > see
> > > > if what you wrote is enough to re-produce it.
> > > >
> > > > On 3/23/07, Ben Dotte <[EMAIL PROTECTED]> wrote:
> > > > > I tried the new version but unfortunately I'm still getting
the
> > same
> > > > > errors.
> > > > >
> > > > > -----Original Message-----
> > > > > From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
> > > > > Sent: Friday, March 23, 2007 9:45 AM
> > > > > To: Tapestry users
> > > > > Subject: Re: OGNL AND errors
> > > > >
> > > > > I think a new ognl version went out last night. I would try
that
> > > > first.
> > > > >
> > > > > On 3/23/07, Ben Dotte <[EMAIL PROTECTED]> wrote:
> > > > > > I recently tried updating from a Tapestry 4.1.2 snapshot a
> > couple
> > > > > months
> > > > > > old to one from 3-21. Along the way I had to incorporate the
> new
> > > 2.7
> > > > > > OGNL snapshot from 3-18. I'm seeing multiple expressions on
> each
> > > > page
> > > > > > that no longer work. So far they have all involved AND
> > > expressions.
> > > > > Here
> > > > > > are some examples:
> > > > > >
> > > > > >
> > > > > >
> > > > > > info.rootCause.getMessage() != null &&
> > > > > > info.rootCause.getMessage().length() > 0
> > > > > >
> > > > > > currentElement.message != null &&
> > currentElement.message.length()
> > > >
> > > > 0
> > > > > >
> > > > > > sysMessages != null && sysMessages.size() != 0
> > > > > >
> > > > > > title != null && title.length() > 0
> > > > > >
> > > > > >
> > > > > >
> > > > > > Here is an example error message:
> > > > > >
> > > > > > Error compiling expression on object
> > > > > >
> > > > >
> > > >
> > >
> >
>
[EMAIL PROTECTED]/$SystemMessageDisplay
> > > > > > ] with expression node (sysMessages != null) &&
> > > (sysMessages.size()
> > > > !=
> > > > > > 0) getter body: { return ($w)
> > > > > >
> > > > >
> > > >
> > >
> >
>
((ognl.OgnlOps.booleanValue((($SystemMessageDisplay_245)$2).getSysMessag
> > > > > > es() != null) ?
ognl.OgnlOps.convertValue(!ognl.OgnlOps.equal(
> > > ($w)
> > > > > >
> > > > >
> > > >
> > >
> >
>
ognl.OgnlOps.convertValue((($SystemMessageDisplay_245)$2).getSysMessages
> > > > > > ().size(), java.lang.Integer.class) ,
> > ognl.OgnlOps.convertValue(0,
> > > > > > java.lang.Integer.class)), java.lang.Integer.class) :
> > > > > > (($SystemMessageDisplay_245)$2).getSysMessages() != null));}
> > > setter
> > > > > > body: { _node.setValue($1, $2, $3); }
> > > > > >
> > > > > >
> > > > > >
> > > > > > Our app is now specless so any objects being accessed are
> > defined
> > > on
> > > > > the
> > > > > > Java class. I can open a case in the OGNL issue tracking
> system
> > > but
> > > > I
> > > > > > wanted to check if anyone knows what is going on first since
I
> > > don't
> > > > > > want to have to go through and convert hundreds of
expressions
> > to
> > > > Java
> > > > > > code if I can avoid it (still haven't even gotten our Home
> page
> > to
> > > > > come
> > > > > > up yet..)
> > > > > >
> > > > > >
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Ben
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Jesse Kuhnert
> > > > > Tapestry/Dojo team member/developer
> > > > >
> > > > > Open source based consulting work centered around
> > > > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail:
[EMAIL PROTECTED]
> > > > >
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > > For additional commands, e-mail:
[EMAIL PROTECTED]
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Jesse Kuhnert
> > > > Tapestry/Dojo team member/developer
> > > >
> > > > Open source based consulting work centered around
> > > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > Jesse Kuhnert
> > > Tapestry/Dojo team member/developer
> > >
> > > Open source based consulting work centered around
> > > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Jesse Kuhnert
> > Tapestry/Dojo team member/developer
> >
> > Open source based consulting work centered around
> > dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Jesse Kuhnert
> Tapestry/Dojo team member/developer
>
> Open source based consulting work centered around
> dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to