You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Todd Orr <to...@gmail.com> on 2013/04/21 15:26:59 UTC
delegating to block with different wrapper html problem
Why does this throw an exception?
<t:if test="prop:title">
<t:delegate to="${block:formContents}" />
<p:else>
<fieldset>
<legend>${title}</legend>
<t:delegate to="${block:formContents}" />
</fieldset>
</p:else>
</t:if>
Removing the second block delegate attempt works, but obviously doesn't
display the content. This fails the test of least surprise.
Re: delegating to block with different wrapper html problem
Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Sun, 21 Apr 2013 19:23:27 -0300, Bob Harner <bo...@gmail.com> wrote:
> Yes, this is such a common mistake that the error probably should be much
> clearer.
I'd even suggest some configuration symbol (default value true) which
treats expansions in parameter values as template errors. (By the way, I'm
back. :P)
--
Thiago H. de Paula Figueiredo
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: delegating to block with different wrapper html problem
Posted by Bob Harner <bo...@gmail.com>.
Yes, this is such a common mistake that the error probably should be much
clearer.
On Sun, Apr 21, 2013 at 11:27 AM, Todd Orr <to...@gmail.com> wrote:
> Thanks!
>
>
> On Sun, Apr 21, 2013 at 9:34 AM, Taha Siddiqi <tawus.tapestry@gmail.com
> >wrote:
>
> > You can't use property expressions with component parameters
> >
> > You should try
> >
> > <t:delegate to='block:fromContents'/>
> >
> >
> > regards
> > Taha
> >
> > On Apr 21, 2013, at 6:56 PM, Todd Orr wrote:
> >
> > > Why does this throw an exception?
> > >
> > > <t:if test="prop:title">
> > >
> > > <t:delegate to="${block:formContents}" />
> > >
> > > <p:else>
> > >
> > > <fieldset>
> > >
> > > <legend>${title}</legend>
> > >
> > > <t:delegate to="${block:formContents}" />
> > >
> > > </fieldset>
> > >
> > > </p:else>
> > >
> > > </t:if>
> > >
> > >
> > > Removing the second block delegate attempt works, but obviously doesn't
> > > display the content. This fails the test of least surprise.
> >
> >
>
Re: delegating to block with different wrapper html problem
Posted by Todd Orr <to...@gmail.com>.
Thanks!
On Sun, Apr 21, 2013 at 9:34 AM, Taha Siddiqi <ta...@gmail.com>wrote:
> You can't use property expressions with component parameters
>
> You should try
>
> <t:delegate to='block:fromContents'/>
>
>
> regards
> Taha
>
> On Apr 21, 2013, at 6:56 PM, Todd Orr wrote:
>
> > Why does this throw an exception?
> >
> > <t:if test="prop:title">
> >
> > <t:delegate to="${block:formContents}" />
> >
> > <p:else>
> >
> > <fieldset>
> >
> > <legend>${title}</legend>
> >
> > <t:delegate to="${block:formContents}" />
> >
> > </fieldset>
> >
> > </p:else>
> >
> > </t:if>
> >
> >
> > Removing the second block delegate attempt works, but obviously doesn't
> > display the content. This fails the test of least surprise.
>
>
Re: delegating to block with different wrapper html problem
Posted by Taha Siddiqi <ta...@gmail.com>.
You can't use property expressions with component parameters
You should try
<t:delegate to='block:fromContents'/>
regards
Taha
On Apr 21, 2013, at 6:56 PM, Todd Orr wrote:
> Why does this throw an exception?
>
> <t:if test="prop:title">
>
> <t:delegate to="${block:formContents}" />
>
> <p:else>
>
> <fieldset>
>
> <legend>${title}</legend>
>
> <t:delegate to="${block:formContents}" />
>
> </fieldset>
>
> </p:else>
>
> </t:if>
>
>
> Removing the second block delegate attempt works, but obviously doesn't
> display the content. This fails the test of least surprise.