I think I had the same problem a while ago.
Look at the solution in discussion underneath:
http://www.nabble.com/TabbedPanel-%2B-authorization-strategy-td13949910.html#a13965618


Linda van der Pal wrote:
> 
> I'm trying to disable a tab in a TabbedPanel based on authorization. I'm 
> using wicket-auth-roles, and it works in other places, for example for 
> buttons. Could anybody tell me what I'm doing wrong? The tab just keeps 
> on showing, and if you click on it you go to a page that states that you 
> don't have authorization for that page. (As I have added an annotation 
> to that page as well.)
> 
> public class BookDetailsPanel extends Panel {
>     ...
>     public BookDetailsPanel(String id, final String isbn, boolean 
> showEditPanel) {
>        ...
>        List tabs = new ArrayList();
>        ...
>        tabs.add(new OwnerEditTab(new Model("edit"), isbn));
>        ...
>     }
>     @AuthorizeAction(action = Action.RENDER, roles = { "OWNER" })
>     private class OwnerEditTab extends AbstractTab {
>         private static final long serialVersionUID = 1L;
>         private String isbn;
>        
>         public OwnerEditTab(IModel model, String isbn) {
>             super(model);
>             this.isbn = isbn;
>         }
>        
>         @Override
>         public Panel getPanel(String panelId) {
>             return new BookDetailsEditPanel(panelId, isbn);
>         }
>     }
> }
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/authorizing-a-tab-tp22925752p22926397.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to