You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Waimun Yeow <wa...@dev.java.net> on 2005/08/30 22:20:15 UTC
Referencing page property from component specification
Hi folks,
I have a component specification .jwc with a component of type Insert.
The binding expression needs to reference to a page property value that
called it. For example, by random, if page A include this component,
then the Insert component will need to read page A property via ognl
thru binding expression attribute.
Any hints? Thanks a lot.
--
waimun
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Referencing page property from component specification
Posted by Robert Zeigler <ro...@scazdl.org>.
Hm. Well, this really sounds like a good candidate for a
component-parameter. :)
But... as long as you can guarantee that the property will exist...
you can do something like:
ognl:page.<property>
getPage() returns the containing page. Note that if you use complex
block/render-block schemes (where the block is placed on one page but
contained within a different page), this can lead to unexpected results
(getPage() will return the page which contains the block, and NOT the
page currently doing the rendering). Again... /generally/ speaking,
you'd be better off making this a component parameter.
Robert
Waimun Yeow wrote:
> Hi folks,
>
> I have a component specification .jwc with a component of type Insert.
> The binding expression needs to reference to a page property value that
> called it. For example, by random, if page A include this component,
> then the Insert component will need to read page A property via ognl
> thru binding expression attribute.
>
> Any hints? Thanks a lot.
>
> --
> waimun
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org