You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Geoffrey Wiseman <ge...@gmail.com> on 2009/06/04 15:29:00 UTC

Re: [T 5.1] Problem with: Block parameters are only allowed directly within component elements

On Thu, Jun 4, 2009 at 4:04 AM, Stefan Esterer <de...@gmail.com> wrote:

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


Why would you do that, just for previewability?  That structure doesn't make
a ton of sense to me.  If there's a user, should tapestry render:

> Welcome back, Stefan Esterer<div></div>
>

And if there's no user:

> <a href="login">Login</a> / <a href="register">Register</a>
>

I'm curious for the people who are getting bitten by this what they have in
mind.

  - Geoffrey
-- 
Geoffrey Wiseman
http://www.geoffreywiseman.ca/

Re: [T 5.1] Problem with: Block parameters are only allowed directly within component elements

Posted by Howard Lewis Ship <hl...@gmail.com>.
Too much noise here; that should read

"in your example, the <div> will *always* rfender empty and only if
the user is not null in 5.0."

On Thu, Jun 4, 2009 at 11:18 AM, Howard Lewis Ship <hl...@gmail.com> wrote:
> What Tapestry is doing now in 5.1 is correct.  In you example, the
> <div> will *always* render empty, and only if user is null in 5.0. 5.1
> forces you to put the <p:else> where it makes sense.  The Tapestry 5.0
> documentation should have been more specific, that you place it
> *directly* inside the body of the component (not merely somehwhere
> inside).
>
> On Thu, Jun 4, 2009 at 6:29 AM, Geoffrey Wiseman
> <ge...@gmail.com> wrote:
>> On Thu, Jun 4, 2009 at 4:04 AM, Stefan Esterer <de...@gmail.com> wrote:
>>
>>> 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>
>>>
>>
>>
>> Why would you do that, just for previewability?  That structure doesn't make
>> a ton of sense to me.  If there's a user, should tapestry render:
>>
>>> Welcome back, Stefan Esterer<div></div>
>>>
>>
>> And if there's no user:
>>
>>> <a href="login">Login</a> / <a href="register">Register</a>
>>>
>>
>> I'm curious for the people who are getting bitten by this what they have in
>> mind.
>>
>>  - Geoffrey
>> --
>> Geoffrey Wiseman
>> http://www.geoffreywiseman.ca/
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
> Director of Open Source Technology at Formos
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

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


Re: [T 5.1] Problem with: Block parameters are only allowed directly within component elements

Posted by Howard Lewis Ship <hl...@gmail.com>.
What Tapestry is doing now in 5.1 is correct.  In you example, the
<div> will *always* render empty, and only if user is null in 5.0. 5.1
forces you to put the <p:else> where it makes sense.  The Tapestry 5.0
documentation should have been more specific, that you place it
*directly* inside the body of the component (not merely somehwhere
inside).

On Thu, Jun 4, 2009 at 6:29 AM, Geoffrey Wiseman
<ge...@gmail.com> wrote:
> On Thu, Jun 4, 2009 at 4:04 AM, Stefan Esterer <de...@gmail.com> wrote:
>
>> 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>
>>
>
>
> Why would you do that, just for previewability?  That structure doesn't make
> a ton of sense to me.  If there's a user, should tapestry render:
>
>> Welcome back, Stefan Esterer<div></div>
>>
>
> And if there's no user:
>
>> <a href="login">Login</a> / <a href="register">Register</a>
>>
>
> I'm curious for the people who are getting bitten by this what they have in
> mind.
>
>  - Geoffrey
> --
> Geoffrey Wiseman
> http://www.geoffreywiseman.ca/
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

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