You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F.R. Da Costa Gomez" <dc...@fixed.com> on 2003/03/17 14:53:12 UTC
ognl: notation
Hi all,
Just 2 small questions:
I've got an A.page & an A.java and an A.html as well as a Home.(page,
html & java)
From Home.html I can do <span jwcid="@Insert" value="ognl:message">, no
worries.
Q: What is the syntax for doing the same thing from A.html (call the
Home.getMessage() method that is)?
Following are the ones I more or less expected but I'm probably
overlooking something because they give me an "unable to resolve
expression" error.
<span jwcid="@Insert" value="ognl:home.message">
<span jwcid="@Insert" value="ognl:Home.message">
<span jwcid="@Insert"
value="ognl:fully.qualified.classname.Home.message">
Q2: Is there any compelling reason to NOT just use @Insert rather than
mixing @Insert and @InsertText?
Thx in advance 4 the help,
Fermin DCG
Re: ognl: notation
Posted by Eric Everman <ev...@precedadesign.com>.
What you are trying to isn't possible. A page can not call methods on
another page because you have no reference to the page (just like in the
Java object model). Without a reference there may be zero or many
instances of that page, so there is no way to determine which instance to
call getMessage() on. Tapestry pools instances of pages (see the docs for
this), so you should *never* try hold to hold a reference to a page or
component in your code.
If you need to store cross-page info like this, use the Visit interface.
Eric Everman
At 3/17/2003, you wrote:
>Hi all,
>
>Just 2 small questions:
>
>I've got an A.page & an A.java and an A.html as well as a Home.(page, html
>& java)
> From Home.html I can do <span jwcid="@Insert" value="ognl:message">, no
> worries.
>
>Q: What is the syntax for doing the same thing from A.html (call the
>Home.getMessage() method that is)?
>Following are the ones I more or less expected but I'm probably
>overlooking something because they give me an "unable to resolve
>expression" error.
> <span jwcid="@Insert" value="ognl:home.message">
> <span jwcid="@Insert" value="ognl:Home.message">
> <span jwcid="@Insert" value="ognl:fully.qualified.classname.Home.message">
>
>Q2: Is there any compelling reason to NOT just use @Insert rather than
>mixing @Insert and @InsertText?
>
>Thx in advance 4 the help,
>
>Fermin DCG
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org