You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Allen Guo <el...@gmail.com> on 2007/06/29 05:24:28 UTC

Invoke method with pararmeters in TP5.0.5

Hi All,

Suppose there is a method with parameters in page class like this
// CssPage.java
.....
pubic String getEcho(String echo){
return "[" + echo + "]";
}


Can I call it in html template like this?
// CssPage.html
......

${getImage('HELLO')}
...

I just tested it. It doesn't work.
I want to know if tp5 support the feature? If not, do you think if we
really need the feature???


Thanks
Allen Guo


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


Re: Invoke method with pararmeters in TP5.0.5

Posted by Nick Westgate <ni...@key-planning.co.jp>.
No, not yet. Expansions are a shorthand for Property Bindings, described here:
http://tapestry.apache.org/tapestry5/tapestry-core/guide/parameters.html

The original reason for prop (IIRC) was to improve on the performance of OGNL.
Now that the much faster OGNL 2.7 has been released, it could be an add-on for
T5 as Howard mentions here:
http://howardlewisship.com/tapestry-javaforge/tapestry-prop/

Cheers,
Nick.


Allen Guo wrote:
> Hi All,
> 
> Suppose there is a method with parameters in page class like this
> // CssPage.java
> .....
> pubic String getEcho(String echo){
> return "[" + echo + "]";
> }
> 
> 
> Can I call it in html template like this?
> // CssPage.html
> ......
> 
> ${getImage('HELLO')}
> ...
> 
> I just tested it. It doesn't work.
> I want to know if tp5 support the feature? If not, do you think if we
> really need the feature???
> 
> 
> Thanks
> Allen Guo
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
> 
> 

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