Thanks for quick reply Warren,
exactly my code SecureWebMarkupContainer.java is same as with your code.
But its still not working. 
I am newbie in java wicket, so i need more example/hint for understanding its. 
I am sure that missing something but i dont know how to solve it.

Can anyone help me? thanks 



--- Pada Kam, 16/7/09, Warren Bell <[email protected]> menulis:

> Dari: Warren Bell <[email protected]>
> Judul: Re: How to Hidden/Disabled Wicket tree with implementation wicket 
> security
> Kepada: [email protected], [email protected]
> Tanggal: Kamis, 16 Juli, 2009, 11:09 AM
> Try this:
> 
> Warren
> 
> public class SecureWebMarkupContainer extends
> WebMarkupContainer implements ISecureComponent {
> 
>    public SecureWebMarkupContainer(String
> id)
>    {
>     super(id);
> 
>        setSecurityCheck(new
> ComponentSecurityCheck(this));
>    }
>      public
> SecureWebMarkupContainer(String id, IModel model)
>    {
>        super(id, model);
>        setSecurityCheck(new
> ComponentSecurityCheck(this));
>    }
>      public final void
> setSecurityCheck(ISecurityCheck check)
>    {
>    
>    SecureComponentHelper.setSecurityCheck(this,
> check);
>    }
> 
>    public final ISecurityCheck
> getSecurityCheck()
>    {
>        return
> SecureComponentHelper.getSecurityCheck(this);
>    }
> 
>    public boolean isActionAuthorized(String
> action)
>    {
>        return
> SecureComponentHelper.isActionAuthorized(this, action);
>    }
> 
>    public boolean
> isActionAuthorized(WaspAction action)
>    {
>        return
> SecureComponentHelper.isActionAuthorized(this, action);
>    }
> 
>    public boolean isAuthenticated()
>    {
>        return
> SecureComponentHelper.isAuthenticated(this);
>    }
>      public boolean
> isAuthenticatedAndAuthorized(String action)
>    {
>        return isAuthenticated()
> && isActionAuthorized(action);
>    }
> 
> {
> 
> 
> Rizal Indra wrote:
> > Hi,
> > I have created my welcome page with menu tree 
> > (http://wicketstuff.org/wicket13/nested/ ). I want to
> hide/disabled some item menu depend on user right
> principal.
> > 
> > I have try put some tricks but not work :-)
> > MyTree.java
> > public class MyTree extends Tree {
> > @Override
> >     protected void
> populateTreeItem(WebMarkupContainer item, int level) {
> >     
>    System.out.println(" getting
> populateTreeItem...");
> >     
>    super.populateTreeItem(item, level);
> >         final TreeNode
> node = (TreeNode)item.getModelObject();
> >         MarkupContainer
> nodeLink =  newNodeLink(item, "nodeLink", node);
> >     
>    SecureWebMarkupContainer swmc = new
> SecureWebMarkupContainer("hiddenMenu");
> >     
>    swmc.add(nodeLink);
> >     
>    //item.add(nodeLink);
> >         item.add(swmc);
> >     }
> > }
> > 
> > SecureWebMarkupContainer.java
> > public class SecureWebMarkupContainer extends
> WebMarkupContainer implements ISecureComponent {
> > ...
> > }
> > 
> > can anyone give some example/advice how to make it
> work. thanks 
> > 
> > 
> >       Pemanasan global? Apa
> sih itu? Temukan jawabannya di Yahoo! Answers! http://id.answers.yahoo.com
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 


      Berbagi foto Flickr dengan teman di dalam Messenger. Jelajahi Yahoo! 
Messenger yang serba baru sekarang! http://id.messenger.yahoo.com

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

Reply via email to