If you want the method to be showFoo(), then you need to do test="showFoo()". But you can use test="showFoo" if showFoo() is renamed to isShowFoo, iff you change the accessor to public (from protected). That is, for property access, tapestry is following java beans conventions, and a property is only a java beans property if it's public. :)

Robert

On Aug 13, 2009, at 8/1311:34 AM , Michael Gentry wrote:

Hi all,

I've been searching the documentation/examples/list all morning, but
can't find an answer to this so far.  Can T5.1 do a conditional
against a method instead of a variable (property)?  I have something
like:

<div t:type="If" test="showFoo">...</div>

For the Java, I have tried numerous varieties of:

protected boolean showFoo() { ... }

(isShowFoo, getShowFoo, etc, etc)

I keep getting an exception that it can't convert showFoo to a
component parameter binding, then it shows me all the variables (not
methods) in my class.  Of course, you can't put an @Property on a
method, either.  Is it not possible in T5 to bind your conditional to
a method?  (T4 could do this.)

Thanks,

mrg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to