${...} expansions evaluate the expression and convert it to a string.

Since the page parameter expects a string, that's OK.

Converting a context (an array or List to a string) is different than
passing the List, unchanged, as the context parameter.

Allowing ${...} expansions in attribute values was added for ordinary,
non-component, elements that want a little bit of dynamic behavior.  For
components, use the prop: binding prefix. This is expecially important for
form components such as TextArea, as prop:somePageProperty is read/write
(the TextField can update the property when the form is submitted), whereas
${somePageProperty} is converted to a string and is read-only.

On Thu, Jun 11, 2009 at 6:38 AM, Kai Weber <[email protected]> wrote:

> Hi,
>
> I am a Tapestry beginner. I am far from knowing all the internals. I use
> the PageLink component in one of my as follows:
>
> @Component(id="backLink",
> parameters={
>  "page=${backLink}",
>  "context=backLinkContext",
>  "anchor=${prev.getUniqueIdentifier()}"})
> private PageLink backLink;
>
> My question is now
>
> What does the ${...} do?
>
> I fail to see what this means: If I replace "context=prop:backLinkContext"
> with "context=${backLinkContext}" I get a different link than expected. If I
> replace "page=prop:backLink" with "page=${backLink}" I get no different
> link. Why?
>
> Kai
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

Reply via email to