/**
* Copyright SocialSite (C) 2009
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.socialsite.profile;
import java.util.ArrayList;
import java.util.List;
import org.apache.wicket.extensions.ajax.markup.html.tabs.AjaxTabbedPanel;
import org.apache.wicket.extensions.markup.html.tabs.AbstractTab;
import org.apache.wicket.extensions.markup.html.tabs.ITab;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.model.Model;
import com.socialsite.BasePage;
import com.socialsite.user.UserInfoPanel;
/**
*
* Main Profile Page
*
* @author Ananth
*/
public class ProfilePage extends BasePage
{
public ProfilePage()
{
// add the user info panel
add(new UserInfoPanel("userinfo"));
final List<ITab> tabs = new ArrayList<ITab>();
tabs.add(new AbstractTab(new Model<String>("Basic"))
{
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public Panel getPanel(final String panelId)
{
return new BasicTabPanel(panelId);
}
});
tabs.add(new AbstractTab(new Model<String>("Personal"))
{
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public Panel getPanel(final String panelId)
{
return new PersonalTabPanel(panelId);
}
});
tabs.add(new AbstractTab(new Model<String>("Contact"))
{
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public Panel getPanel(final String panelId)
{
return new ContactTabPanel(panelId);
}
});
tabs.add(new AbstractTab(new Model<String>("Education"))
{
/**
*
*/
private static final long serialVersionUID = 1L;
@Override
public Panel getPanel(final String panelId)
{
return new EducationTabPanel(panelId);
}
});
add(new AjaxTabbedPanel("tabs", tabs));
}
}