Hi,

On 19/11/2010 07:18, Gilberto wrote:
> class: ViewLegalEntity.java[1]
> 
> <quote>
>     protected PageLink editLink = new PageLink("editLink", 
> EditLegalEntity.class);
>     protected ActionLink deleteLink = new ActionLink("deleteLink", this, 
> "onDeleteClick");
> </quote>
> 
> properties:ViewLegalEntity.properties[1]
> 
> <quote>
> editLink.label=Edit
> editLink.title=Edit LegalEntity record
> deleteLink.label=Delete
> deleteLink.title=Delete LegalEntity record
> </quote>
> 
> That doesn't work! Are those definition correct?

Your code looks right. Have a look at your war and make sure your property 
files are included next
to your class files.


> Other question: can I localize the ActionLink's attribute?
> Like so:
> <quote>
> deleteLink.attribute.onclick=return window.confirm('Are you sure you want to 
> delete this record?');


Both Page and Controls have getMessage methods and variants for this purpose:

String msg = getMessage("deleteMsg");
deleteLink.attribute.onclick=return window.confirm( msg );

You can create a custom delete Link if you need to use this behavior in 
multiple places.

Kind regards

Bob

Reply via email to