/*
 * This is free and unencumbered software released into the public domain.
 */
package org.wicketsample;

import org.apache.log4j.Logger;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.link.Link;

import javax.servlet.http.HttpServletRequest;

/**
 * Base class for wicketsample project.
 *
 * @author Shawn McKinney
 * @version $Rev$
 */
public abstract class WicketSampleBasePage extends WebPage
{
/*
    // TODO STEP 8a: enable spring injection of fortress bean here:
    @SpringBean
    private AccessMgr accessMgr;
    @SpringBean
    private J2eePolicyMgr j2eePolicyMgr;
*/

    public WicketSampleBasePage()
    {
/*
        // TODO STEP 8b: uncomment call to enableFortress:
        try
        {
            SecUtils.enableFortress( this, ( HttpServletRequest ) getRequest().getContainerRequest(), j2eePolicyMgr, accessMgr );
        }
        catch (org.apache.directory.fortress.core.SecurityException se)
        {
            String error = "WicketSampleBasePage caught security exception : " + se;
            LOG.warn( error );
        }
*/
        // TODO STEP 8c: change to FtBookmarkablePageLink:
        add( new BookmarkablePageLink( "page1.link", Page1.class ) );
        add( new BookmarkablePageLink( "page2.link", Page2.class ) );
        add( new BookmarkablePageLink( "page3.link", Page3.class ) );
        final Link actionLink = new Link( "logout.link" )
        {
            @Override
            public void onClick()
            {
                setResponsePage(LogoutPage.class);
            }
        };
        add( actionLink );
        add( new Label( "footer", "This is free and unencumbered software released into the public domain." ) );
    }

    /**
     * Used by the child pages.
     *
     * @param target for modal panel
     * @param msg to log and display user info
     */
    protected void logIt(AjaxRequestTarget target, String msg)
    {
        info( msg );
        LOG.info( msg );
        target.appendJavaScript(";alert('" + msg + "');");
    }

    protected static final Logger LOG = Logger.getLogger( WicketSampleBasePage.class.getName() );
}
@@ -391,17 +391,16 @@
 k.Link;%0A
-%0A
 import j
@@ -438,16 +438,254 @@
 quest;%0A%0A
+/*%0Aimport org.apache.directory.fortress.web.control.SecUtils;%0Aimport org.apache.directory.fortress.core.AccessMgr;%0Aimport org.apache.directory.fortress.realm.J2eePolicyMgr;%0Aimport org.apache.wicket.spring.injection.annot.SpringBean;%0A*/%0A%0A%0A
 /**%0A * B
@@ -832,19 +832,16 @@
 bPage%0A%7B%0A
-/*%0A
     // T
@@ -900,16 +900,19 @@
 n here:%0A
+/*%0A
     @Spr
@@ -1053,19 +1053,16 @@
 )%0A    %7B%0A
-/*%0A
         
@@ -1112,16 +1112,19 @@
 rtress:%0A
+/*%0A
         
@@ -1129,32 +1129,32 @@
   try%0A        %7B%0A
-
             SecU
@@ -1253,16 +1253,32 @@
 licyMgr,
+%0A               
  accessM

comment out security imports