You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Dan Adams <da...@ifactory.com> on 2007/06/29 22:27:27 UTC

[t5] no support for block parameters?

In t4 you could this:

<comp jwcid="@RenderBlock" block="component:block" foo="bar" />

<block jwcid="block@Block">
  <ins jwcid="@Insert"
value="ognl:components.block.getParameter('foo')" />
</block>

Does such a thing exist in T5?

-- 
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


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


Re: [t5] no support for block parameters?

Posted by Dan Adams <da...@ifactory.com>.
hmm. This seems like a very clean way of doing it for more well-defined
instances but I think it might be a little too much overhead other
situations. For instance, I'll often want to define a block within a
template and then just get the values from within the block but having
to define an interface for that seems like too much. Perhaps if there
was a way of having a standard context interface which could be created
by block containing it's informal parameters. But this would require the
ability to use OGNL map access.

On Fri, 2007-06-29 at 16:07 -0700, Howard Lewis Ship wrote:
> <t:delegate to="block:myblock"/>
> 
> <t:block id="myblock">
>   ...
> </t:block>
> 
> What's missing is a way of providing context in the caller (the
> Delegate component) that is accessible inside the block.
> 
> What I've been doing is using a more indirect, but also more typesafe,
> approach of storing the data inside an Environmental service; the
> caller uses Environment.push(), and the block uses the @Environmental
> annotation to retrieve the value.  You can see this in action inside
> BeanEditForm.
> 
> On 6/29/07, Dan Adams <da...@ifactory.com> wrote:
> > In t4 you could this:
> >
> > <comp jwcid="@RenderBlock" block="component:block" foo="bar" />
> >
> > <block jwcid="block@Block">
> >   <ins jwcid="@Insert"
> > value="ognl:components.block.getParameter('foo')" />
> > </block>
> >
> > Does such a thing exist in T5?
> >
> > --
> > Dan Adams
> > Senior Software Engineer
> > Interactive Factory
> > 617.235.5857
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
> 
> 
-- 
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


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


Re: [t5] no support for block parameters?

Posted by Howard Lewis Ship <hl...@gmail.com>.
<t:delegate to="block:myblock"/>

<t:block id="myblock">
  ...
</t:block>

What's missing is a way of providing context in the caller (the
Delegate component) that is accessible inside the block.

What I've been doing is using a more indirect, but also more typesafe,
approach of storing the data inside an Environmental service; the
caller uses Environment.push(), and the block uses the @Environmental
annotation to retrieve the value.  You can see this in action inside
BeanEditForm.

On 6/29/07, Dan Adams <da...@ifactory.com> wrote:
> In t4 you could this:
>
> <comp jwcid="@RenderBlock" block="component:block" foo="bar" />
>
> <block jwcid="block@Block">
>   <ins jwcid="@Insert"
> value="ognl:components.block.getParameter('foo')" />
> </block>
>
> Does such a thing exist in T5?
>
> --
> Dan Adams
> Senior Software Engineer
> Interactive Factory
> 617.235.5857
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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