Well everything looks fine, so i will ask you to verify a few things for me.
-Your hive file has permissions which continue over the next line, i
assume this is caused by copy pasting the file here and that in the
actual hive file each permission is on exactly 1 line.
-I assume all the page classes in the policy file extend this
BaseSecurePage of yours
-Can you turn on debug logging for BasicHive and
PolicyFileHiveFactory, i would like to see if you get any messages
about the user not having permissions for the links and messages about
skipped policy file lines
-Are you using 1.3.0 or 1.3-SNAPSHOT?
-According to the policy file these permissions are granted to any
authenticated user, can you confirm you indeed have an authenticated
user.
-Can you show me your application, in particular the methods swarm
requires you to implement

I cannot explain why your logoff link is not displayed, it is not
secured as far as i can see, so it should always render.

Maurice


On Sun, May 4, 2008 at 3:42 AM, NHSoft.YHW <[EMAIL PROTECTED]> wrote:
>
>
>  my hive file:
>  grant
>  {
>         permission ${ComponentPermission} "wm.wicket.pages.HomePage", 
> "inherit,
>  render";
>         permission ${ComponentPermission} "wm.wicket.pages.HomePage", 
> "enable";
>         permission ${ComponentPermission} "wm.wicket.pages.ManageCenterPage",
>  "inherit, render";
>         permission ${ComponentPermission} "wm.wicket.pages.ManageCenterPage",
>  "enable";
>         permission ${ComponentPermission} 
> "wm.wicket.pages.UserAccountFormPage",
>  "inherit, render";
>         permission ${ComponentPermission} 
> "wm.wicket.pages.UserAccountFormPage",
>  "enable";
>  };
>
>  BaseSecurePage extend SecureWebPage:
>
>  public class BaseSecurePage extends SecureWebPage {
>         private static final long serialVersionUID = 1L;
>
>         protected static final Logger logger =
>  LoggerFactory.getLogger(BaseSecurePage.class);
>
>         public BaseSecurePage() {
>                 final HeaderPanel headerPanel = new HeaderPanel();
>                 headerPanel.setRenderBodyOnly(true);
>                 add(headerPanel);
>         }
>  ...
>  }
>
>  when i add link to headerPanel, the link(both wicket's Link and swarm
>  SecurePageLink) will not render(not visible), but when i change my
>  BaseSecurePage extend WebPage, the link will visible.
>
>  my link create code in HeaderPanel as follow:
>
>  public class HeaderPanel extends BasePanel {
>         public HeaderPanel() {
>                 //general link
>                 Link logoff = new Link("logoff")
>                 {
>                         private static final long serialVersionUID = 1L;
>
>                         public void onClick()
>                         {
>                                 WaspSession waspSession = 
> ((WaspSession)getSession());
>                                 LoginContext loginContext =
>  ((wm.wicket.Application)getApplication()).getLogoffContext();
>                                 if (waspSession.logoff(loginContext))
>                                 {
>                                         // homepage is not allowed anymore so 
> we end up at the loginpage
>                                         
> setResponsePage(Application.get().getHomePage());
>                                         waspSession.invalidate();
>                                 } else {
>                                         error("A problem occured during the 
> logoff process, please try again or
>  contact support");
>                                 }
>                         }
>                 };
>                 add(logoff);
>
>                 //Swarm Secure Link
>                 final SecurePageLink lnkCreateUserAccount = new
>  SecurePageLink("toCreateUserAccount", UserAccountFormPage.class);
>                 lnkCreateUserAccount.setAutoEnable(true);
>                 add(lnkCreateUserAccount);
>                 ....
>         }
>  }
>
>  I want to know why link not render, if my hive file has some problem, how to
>  change hive config file for can show link
>  --
>  View this message in context: 
> http://www.nabble.com/why-swarm-not-render-link-tp17041821p17041821.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]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to