Hi List...

I just switched from Tapestry 5.0.18 to Tapestry 5.1.0.5 and I'm
experiencing a problem with the IF component. 
I'm not quite sure if this is a bug or feature, so please enlighten me *g*

For demonstration I just use the tutorial IF example
(http://tapestry.apache.org/tapestry5.1/tapestry-core/ref/org/apache/tapestry5/corelib/components/If.html).
 
It looks like this

<t:if test="user">
            Welcome back, ${user.firstName}
            <p:else>
                <t:pagelink name="login">Login</t:pagelink> /
                <t:pagelink name="register">Register</t:pagelink>
            </p:else>
</t:if>

This works perfectly fine. Only if I add a additional <div> I get a problem.

<t:if test="user">
            Welcome back, ${user.firstName}
            <div>
                  <p:else>
                     <t:pagelink name="login">Login</t:pagelink> /
                     <t:pagelink name="register">Register</t:pagelink>
                 </p:else>
            </div>
</t:if>

Using the template with the additional <div> I get this exception:

java.lang.RuntimeException
Block parameters are only allowed directly within component elements.

Is this a design decision or a bug?

Thx for your help
Stefan Esterer
-- 
View this message in context: 
http://www.nabble.com/-T-5.1--Problem-with%3A-Block-parameters-are-only-allowed-directly-within-component-elements-tp23865519p23865519.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to