package votorola.a.register; // Copyright 2008, Michael Allan. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Votorola Software"), to deal in the Votorola Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Votorola Software, and to permit persons to whom the Votorola Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Votorola Software. THE VOTOROLA SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE VOTOROLA SOFTWARE OR THE USE OR OTHER DEALINGS IN THE VOTOROLA SOFTWARE. //import java.io.*; //import org.apache.wicket.*; //import org.apache.wicket.behavior.*; //import org.apache.wicket.markup.html.*; import org.apache.wicket.markup.html.basic.*; //import org.apache.wicket.markup.html.form.*; //import org.apache.wicket.markup.html.panel.*; //import org.apache.wicket.model.*; //import org.apache.wicket.protocol.http.*; //import org.apache.wicket.validation.validator.*; import votorola._.*; //import votorola.a.*; import votorola.a.locale.*; //import votorola.a.voter.*; import votorola.a.web.*; //import votorola.a.web.authen.*; import votorola.g.lang.*; import votorola.g.servlet.*; /** A registration page, for viewing and setting the user's register fields. * * @see * WP_Registration.html */ @ThreadRestricted("wicket") public final class WP_Registration extends VPage implements TabbedPage // public - bookmarkable page { /** Constructs a WP_Registration. */ public WP_Registration() // public - bookmarkable page, must have default|PageParameter constructor { final VRequestCycle cycle = VRequestCycle.get(); add( new WC_NavigationControls( "navSuperBar", WP_Registration.this, cycle )); add( new WC_NavPile( "navPile", navTab(cycle), cycle )); final String title = cycle.bunW().l( "a.register.WC_Registration.title" ); add( new Label( "title", title )); add( new Label( "titleH", title )); try { add( new WC_Registration( "registration", cycle.vSession().userOrNobody().voterEmail() ) .setRenderBodyOnly( true )); } catch( Exception x ) { throw VotorolaRuntimeException.castOrWrapped( x ); } // not much expected } // - T a b b e d - P a g e ------------------------------------------------------------ /** @see #NAV_TAB */ public NavTab navTab( VRequestCycle cycle ) { return NAV_TAB; } /** The navigation tab, linking to the user registration page (an instance of * WP_Registration). */ public static final NavTab NAV_TAB = new NavTab() { private final Bookmark bookmark = new Bookmark( WP_Registration.class ); public @Override Bookmark bookmark() { return bookmark; } public String shortTitle( VRequestCycle cycle ) { return cycle.bunW().l( "a.register.WC_Registration.tab.shortTitle" ); } }; }