Have you tried the following ?
var url = ${getCreateLink("PageName")};
I have tried the following (in Tap 4) and it works.
Suppose in a component Foo.java file, I have
public String getName(String name){
return "Call getName with : " + name;
}
In the corresponding Foo.script :
<input-symbol key="foo" class="Foo"/>
<body>
${foo.getName("ddd")} <-- replaced by the string
returns from getName method
</body>
Shing
--- Darío Vasconcelos <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> my previous question didn't seem to catch much
> attention. I will simplify it.
>
> How can I call a java method (with ognl, of course)
> inside a @Script
> component? I've tried
>
> <body>
> // createLink(String var) is a valid method in the
> .java file
> var url = '${createLink('PageName')}';
> </body>
>
> but Tapestry complains about the PageName variable
> not beind defined.
> Defining the variable does no good either.
>
> If I pass the parameter directly to the @Script,
> then I can use it,
> but my component would need about 50 parameters so
> I'm trying to avoid
> this approach.
>
>
> Regards,
>
> Dario
>
> --
> I have enough money to last me the rest of my life,
> unless I buy something.
> Jackie Mason
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
Home page :
http://uk.geocities.com/matmsh/index.html
___________________________________________________________
To help you stay safe and secure online, we've developed the all new Yahoo!
Security Centre. http://uk.security.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]