WebMarkupContainer adminSpan=new WebMarkupContainer("admin-span") {
  public boolean isVisible() { return getsesion().getuser().isadmin(); }}

if you have a lot of components in that span and you dont want the overhead
of creating them make the span a panel or a fragment and add it or an empty
webmarkupcontainer conditionally

also look at our IAuthorizationStrategy which can enforce these kinds of
rules globally - mainly isActionAuthorized and Component.RENDER

-igor


On 3/8/07, David Robison <[EMAIL PROTECTED]> wrote:

 I have an HTML document where I want to conditionally include (or
exclude) based on the type of user. For example, I might have a span that
contains a link to an administrator page that I only want shown of the user
is an "administrator" user. Is there a convenient way to only include the
span containing the link?

Thanks, David


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to