@Component(parameters={"onClick=message:key-name"})

But then your message would have to contain the javascript (as it would for DH below).
But you could tweak DH's suggestion slightly:


@Component(parameters = {"onClick=confirmMessage"})
...

public  String getConfirmMessage() {
return String.format("return confirm(\"%s\");",messages.get(key- name));
}

Robert

On Jun 27, 2008, at 6/273:00 AM , dhning wrote:

1. @Component(parameters = {"onClick=confirmMessage"})

public String getConfirmMessage() {
return messsage.get("key-name");
}

Just refer that, I haven't tried for it yet.

2. Or you can define your own binding prefix.

Thanks!

DH


----- Original Message -----
From: "滕训华" <[EMAIL PROTECTED]>
To: "'Tapestry users'" <users@tapestry.apache.org>
Sent: Friday, June 27, 2008 2:52 PM
Subject: About the value of the parameters


Hi,everyone



@Component(parameters = {"onClick=literal:return confirm(\"do you want to
delete this record?\");"})



The string “do you want to delete this record?” that I want to read it
from the properties file,how to do it?



I am using the t5



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to