Examples of TabbedPanel


Examples of org.apache.wicket.extensions.markup.html.tabs.TabbedPanel

        add(label);
        TextField fld = new TextField("userName", new PropertyModel(this,
                "principal.name"));
        fld.setVisible(false);
        add(fld);
        add(new TabbedPanel("tabs", tabs));
        controlPannels(false);
    }
View Full Code Here

Examples of org.apache.wicket.extensions.markup.html.tabs.TabbedPanel

        return nameList;
    }

    private void controlPannels(boolean userSelecteed)
    {
        TabbedPanel panel = (TabbedPanel) get("tabs");
        ITab tab;
        panel.getTabs().clear();
        boolean guestUserSelected;
        if (userSelecteed)
        {
            if (principalType.getName().equals(JetspeedPrincipalType.USER))
            {
                String adminRole = getServiceLocator().getPortalConfiguration().getString(PortalConfigurationConstants.ROLES_DEFAULT_ADMIN);
                boolean disableAdminEdit = true;
                try
                {
                    if (getPortletRequest().isUserInRole(adminRole) || !((RoleManager)getRoleManager()).isUserInRole(principal.getName(), adminRole))
                    {
                        disableAdminEdit = false;
                    }
                }
                catch (SecurityException e)
                {
                    // ignore
                }
                if (disableAdminEdit)
                {
                   return;
                }
            }
            else if (principalType.getName().equals(JetspeedPrincipalType.ROLE))
            {
                String adminRole = getServiceLocator().getPortalConfiguration().getString(PortalConfigurationConstants.ROLES_DEFAULT_ADMIN);
                if (principal.getName().equals(adminRole) && !getPortletRequest().isUserInRole(adminRole))
                {                   
                    // disallow maintenance on admin role
                    return;
                }
            }
            guestUserSelected = (principalType.getName().equals(JetspeedPrincipalType.USER) &&
                            principal.getName().equals(((UserManager)getManager()).getAnonymousUser()));
           
            if (!guestUserSelected)
            {
                // if guest user: don't show status panel
                tab = new AbstractTab(new Model("Status"))
                {
                    public Panel getPanel(String panelId)
                    {
                        return new PrincipalStatusPanel(panelId);
                    }
                };
                panel.getTabs().add(tab);
            }
            tab = new AbstractTab(new Model("Associations"))
            {

                public Panel getPanel(String panelId)
                {
                    return new PrincipalAssociationsPanel(panelId);
                }
            };
            panel.getTabs().add(tab);
            tab = new AbstractTab(new Model("Attributes"))
            {

                public Panel getPanel(String panelId)
                {
                    return new PrincipalAttributesPanel(panelId);
                }
            };
            panel.getTabs().add(tab);
            if (!guestUserSelected && principalType.getName().equals(JetspeedPrincipalType.USER))
            {
                tab = new AbstractTab(new Model("Credentials"))
                {

                    public Panel getPanel(String panelId)
                    {
                        return new PrincipalCredentialsPanel(panelId);
                    }
                };
                panel.getTabs().add(tab);
            }
            if (principalType.getName().equals(JetspeedPrincipalType.USER))
            {
                tab = new AbstractTab(new Model("User Profile"))
                {

                    public Panel getPanel(String panelId)
                    {
                        return new UserPrincipalProfilePanel(panelId);
                    }
                };
                panel.getTabs().add(tab);
            }
            panel.setSelectedTab(0);
        } else
        {
            if (principalType.getName().equals(JetspeedPrincipalType.USER))
            {
                tab = new AbstractTab(new Model("New "
                        + principalType.getName().toUpperCase()))
                {

                    public Panel getPanel(String panelId)
                    {
                        return new NewUserPrincipalPanel(panelId);
                    }
                };
            } else
            {
                tab = new AbstractTab(new Model("New "
                        + principalType.getName().toUpperCase()))
                {

                    public Panel getPanel(String panelId)
                    {
                        return new NewPrincipalPanel(panelId);
                    }
                };
            }
            panel.getTabs().add(tab);
            panel.setSelectedTab(0);
        }
    }
View Full Code Here

Examples of org.apache.wicket.extensions.markup.html.tabs.TabbedPanel

    });

    // add the new tabbed panel, attribute modifier only used to switch
    // between different css variations
    add(new TabbedPanel("tabs", tabs).add(AttributeModifier.replace("class",
      TabbedPanelPage.this.getDefaultModel())));

  }
View Full Code Here

Examples of org.apache.wicket.extensions.markup.html.tabs.TabbedPanel

                    };
                }
                tabs.add(tab);
                // }
            }
            add(new TabbedPanel("assocTabs", tabs));
        }
View Full Code Here

Examples of org.apache.wicket.extensions.markup.html.tabs.TabbedPanel

        add(label);
        TextField fld = new TextField("userName", new PropertyModel(this,
                "principal.name"));
        fld.setVisible(false);
        add(fld);
        add(new TabbedPanel("tabs", tabs));
        controlPannels(false);
    }
View Full Code Here

Examples of org.apache.wicket.extensions.markup.html.tabs.TabbedPanel

        return nameList;
    }

    private void controlPannels(boolean userSelecteed)
    {
        TabbedPanel panel = (TabbedPanel) get("tabs");
        ITab tab;
        panel.getTabs().clear();
        if (userSelecteed)
        {
            if (principalType.getName().equals(JetspeedPrincipalType.USER))
            {
                tab = new AbstractTab(new Model("User Profile"))
                {

                    public Panel getPanel(String panelId)
                    {
                        return new UserPrincipalProfilePanel(panelId);
                    }
                };
            } else
            {
                tab = new AbstractTab(new Model("User Profile"))
                {

                    public Panel getPanel(String panelId)
                    {
                        return new PrincipalProfilePanel(panelId);
                    }
                };
            }
            panel.getTabs().add(tab);
            tab = new AbstractTab(new Model("Associations"))
            {

                public Panel getPanel(String panelId)
                {
                    return new PrincipalAssociationsPanel(panelId);
                }
            };
            panel.getTabs().add(tab);
            tab = new AbstractTab(new Model("Attributes"))
            {

                public Panel getPanel(String panelId)
                {
                    return new PrincipalAttributesPanel(panelId);
                }
            };
            panel.getTabs().add(tab);
            if (principalType.getName().equals(JetspeedPrincipalType.USER))
            {
                tab = new AbstractTab(new Model("Credentials"))
                {

                    public Panel getPanel(String panelId)
                    {
                        return new PrincipalCredentialsPanel(panelId);
                    }
                };
                panel.getTabs().add(tab);
            }
            panel.setSelectedTab(0);
        } else
        {
            if (principalType.getName().equals(JetspeedPrincipalType.USER))
            {
                tab = new AbstractTab(new Model("New "
                        + principalType.getName().toUpperCase()))
                {

                    public Panel getPanel(String panelId)
                    {
                        return new NewUserPrincipalPanel(panelId);
                    }
                };
            } else
            {
                tab = new AbstractTab(new Model("New "
                        + principalType.getName().toUpperCase()))
                {

                    public Panel getPanel(String panelId)
                    {
                        return new NewPrincipalPanel(panelId);
                    }
                };
            }
            panel.getTabs().add(tab);
            panel.setSelectedTab(0);
        }
    }
View Full Code Here

Examples of org.apache.wicket.extensions.markup.html.tabs.TabbedPanel

    });

    // add the new tabbed panel, attribute modifier only used to switch
    // between different css variations
    add(new TabbedPanel("tabs", tabs).add(new AttributeModifier("class", true,
      TabbedPanelPage.this.getModel())));

  }
View Full Code Here

Examples of org.apache.wicket.extensions.markup.html.tabs.TabbedPanel

            @Override
            public Panel getPanel(String panelId) {
                return new MonthlyActivityPanel(panelId, getMonitor());
            }
        });
        add(new TabbedPanel("charts", tabs));
       
    }
View Full Code Here

Examples of org.apache.wicket.extensions.markup.html.tabs.TabbedPanel

            @Override
            public Panel getPanel(String panelId) {
                return new OWSDetailsPanel(panelId, getMonitor(), "WCS");
            }
        });
        add(new TabbedPanel("charts", tabs));
       
    }
View Full Code Here

Examples of org.apache.wicket.extensions.markup.html.tabs.TabbedPanel

   * @param id
   * @return the component
   */
  protected Panel getTabBar(String id)
  {
    return new TabbedPanel(id, getTabs());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.