2010/11/19 Bob Schellink <[email protected]>
> 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.
>
> Yes, they are:
<quote>
gilbe...@sugep-dmasi:~/dev/netbeans-config/cip/park$ jar -ft
target/park-1.0-SNAPSHOT.war|grep properties
WEB-INF/classes/park/web/page/MainMenu.properties
WEB-INF/classes/park/web/page/EditLegalEntity.properties
WEB-INF/classes/park/web/page/ViewLegalEntity.properties
WEB-INF/classes/click-page.properties
META-INF/maven/com.google.constructor/park/pom.properties
</quote>
>
> > 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 );
>
> Good, I've did this way:
<quote>
//deleteLink.setAttribute("onclick", "return window.confirm('Are you
sure you want to delete this record?');");
deleteLink.setAttribute("onclick",
getMessage("deleteLink.attribute.onclick"));
</quote>
But the Page and Action link doesn't work[1] yet.
Any idea?
Regards,
Gilberto
PS.: Do you know why the menu items are been duplicate? (see the link)
[1]http://dl.dropbox.com/u/9093640/Screenshot.png