2010/11/19 Bob Schellink <[email protected]> > On 20/11/2010 03:10, Gilberto wrote: > > > > > > 2010/11/19 Bob Schellink <[email protected] <mailto:[email protected]>> > > > > <quote> > > > protected PageLink editLink = new PageLink("editLink", > EditLegalEntity.class); > > > protected ActionLink deleteLink = new ActionLink("deleteLink", > this, "onDeleteClick"); > > > </quote> > > On second glance, the links aren't added to the Page as is done with form > and table. In other words > the links do not have a parent, and thus cannot navigate up to the Page to > pull in the page > localizations. I'm pretty sure the onDeleteClick doesn't work either > because of this. > > You are right again! The correct way: <quote> addControl(form); addControl(table); addControl(deleteLink); addControl(editLink); </quote>
> Note: the Click examples makes use of @Bindable annotation which adds the > control to the page. > However I recommend not using it on controls as people generally find it > difficult to understand and > maintain. > > > PS.: Do you know why the menu items are been duplicate? (see the link) > > > Strange. Can you use your debugger to step into menuFactory.getRootMenu? Yes [1], it appears ok. > Either the menus are loaded > twice or the menus are rendered twice. What happens if you use the macro > #writeMenu($rootMenu) to > render? Are there still dups? > > Yes, they continues duplicated. But I've found the problem. I've put fake image paths on imageSrc tag(I don't have the images yet!), for example: <quote> <menu label=" Parking" path="#" imageSrc="/assets/images/controls.png"> </quote> That caused the rendering problem. After removing that tag the menu works perfectly (either with or without the macro). Regards, Gilberto [1]http://dl.dropbox.com/u/9093640/getRootMenu.png
