Hi,

I have a main menu with an admin link which only renders when the user has the "ADMIN" role (MainMenu.java):

final BookmarkablePageLink adminLink = new BookmarkablePageLink("adminLink", AdminHomePage.class);
  MetaDataRoleAuthorizationStrategy.authorize(adminLink, RENDER, "ADMIN");
  add(adminLink);

In my MainMenu.html I have:

<wicket:enclosure id="adminLink">
  <li>
    <a wicket:id="adminLink">Administratie</a>
  </li>
</wicket:enclosure>

I was hoping that when the admin link is not rendered due to the user not having the proper role, that the <li></li> would also not be rendered, however, it does not seem to work this way...

Is this not the way I'm supposed to do this? Or should this work? Otherwise, what is the right way to go about this?

Thanks in advance,
Sebastiaan

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to