Package org.apache.wicket.extensions.markup.html.tabs

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


    }

    protected void controlTabs()
    {
        SiteTreeNode node = getUserSelectedNode();
        TabbedPanel tabs = (TabbedPanel) get("tabs");
        tabs.getTabs().clear();
        ITab tempTab;
        tempTab = new AbstractTab(new Model("Information"))
        {

            public Panel getPanel(String panelId)
            {
                return new InformationTab(panelId, document);
            }
        };
        tabs.getTabs().add(tempTab);
        tempTab = new AbstractTab(new Model("Metadata"))
        {

            public Panel getPanel(String panelId)
            {
                return new MetaDataTab(panelId, document);
            }
        };
        tabs.getTabs().add(tempTab);
        tempTab = new AbstractTab(new Model("Security"))
        {

            public Panel getPanel(String panelId)
            {
                return new SecurityTab(panelId, document);
            }
        };
        tabs.getTabs().add(tempTab);
        if (node.getDocType().equals(FileType.Folder))
        {
            tempTab = new AbstractTab(new Model("Document ordering"))
            {

                public Panel getPanel(String panelId)
                {
                    return new DocumentOrderingTabPanel(panelId, document);
                }
            };
            tabs.getTabs().add(tempTab);
        }
        if (node.getDocType().equals(FileType.Folder)
                || node.getDocType().equals(FileType.Page))
        {
            tempTab = new AbstractTab(new Model("Menus"))
            {

                public Panel getPanel(String panelId)
                {
                    return new MenuTabPanel(panelId, document);
                }
            };
            tabs.getTabs().add(tempTab);
        }
        tempTab = new AbstractTab(new Model("Import/Export"))
        {

            public Panel getPanel(String panelId)
            {
                return new ImportDataTab(panelId, document);
            }
        };
        tabs.getTabs().add(tempTab);
        tabs.setSelectedTab(0);
    }
View Full Code Here


        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

        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

                    return new SupportsPanel(panelId, paNodeBean);
                }
            };
            tabs.add(supportsTab);
           
            TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs);
            if (get("tabs") == null)
            {
                tabbedPanel.setSelectedTab(0);
            }
            else if (get("tabs") instanceof TabbedPanel)
            {
                TabbedPanel current = (TabbedPanel) get("tabs");
                remove(current);

                if (current.getTabs() == tabbedPanel.getTabs())
                {
                    tabbedPanel.setSelectedTab(current.getSelectedTab());
                }
            }

            addOrReplace(tabbedPanel);
        }
View Full Code Here

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

                    return new MetadataPanel(panelId, paNodeBean);
                }
            };
            tabs.add(metadataTab);

            TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs);
            if (get("tabs") == null)
            {
                tabbedPanel.setSelectedTab(0);
            }
            else if (get("tabs") instanceof TabbedPanel)
            {
                TabbedPanel current = (TabbedPanel) get("tabs");
                remove(current);

                if (current.getTabs() == tabbedPanel.getTabs())
                {
                    tabbedPanel.setSelectedTab(current.getSelectedTab());
                }
            }

            addOrReplace(tabbedPanel);
        }
View Full Code Here

                    }
                } );
            }

            // This is a tabbed panel that submits the form and doesn't switch if there are errors.
            tabbedPanel = new TabbedPanel("tabs", tabs) {
                private static final long serialVersionUID = 1L;
                @Override
                protected WebMarkupContainer newLink(String linkId, final int index)
                {
                    return new TabbedPanelSubmitLink(linkId, index);
View Full Code Here

    });

    // 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.getDefaultModel())));

  }
View Full Code Here

        }
       
        // we need to override with submit links so that the various form
        // element
        // will validate and write down into their
        theForm.add(new TabbedPanel("tabs", tabs) {
            @Override
            protected WebMarkupContainer newLink(String linkId, final int index) {
                return new SubmitLink(linkId) {
                    @Override
                    public void onSubmit() {
View Full Code Here

        // TODO Auto-generated method stub
        return null;
      }
    });

    TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs);
    tabbedPanel.setSelectedTab(getTabIdx(tabs,
        parameters.getString("tab", "File Manager")));

    add(tabbedPanel);
  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.extensions.markup.html.tabs.TabbedPanel

Copyright © 2018 www.massapicom. 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.