Package org.apache.wicket.model

Examples of org.apache.wicket.model.Model


                    final JetspeedDocumentMetaData metaData = (JetspeedDocumentMetaData) listItem
                            .getModelObject();
                    listItem.add(new Label("name", metaData.getName()));
                    listItem.add(new Label("language", metaData.getLanguage()));
                    listItem.add(new Label("value", metaData.getValue()));
                    AjaxLink editLink = new AjaxLink("edit", new Model("edit"))
                    {

                        @Override
                        public void onClick(AjaxRequestTarget target)
                        {
                            metaDataModalWindow.setContent(new MetaDataPanel(
                                    metaDataModalWindow.getContentId(),
                                    metaData, ajaxPanel));
                            metaDataModalWindow.show(target);
                        }
                    };
                    editLink.add(new Label("editLabel", new ResourceModel(
                            "common.edit")));
                    listItem.add(editLink);

                    AjaxLink deleteLink = new AjaxLink("delete", new Model(
                            "delete"))
                    {

                        private static final long serialVersionUID = 1L;
View Full Code Here


        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)
                    {
View Full Code Here

*/
public class JavascriptEventConfirmation extends AttributeModifier
{
    public JavascriptEventConfirmation(String event, String msg)
    {
        super(event, true, new Model(msg));
    }
View Full Code Here

           
        };
        trackingForm.add(putInService);
       
        trackingForm.add(new Label("countLabel", new ResourceModel("tracker.count")));
        Label countValue = new Label("count", new Model(outOfService.size()));
        trackingForm.add(countValue);
       
        checkGroup.add(new Label("portletsLabel", new ResourceModel("tracker.portlets")));
       
        PageableListView portletsList = new PageableListView("portlets", new PropertyModel(this, "outOfService"), 10)
View Full Code Here

                final String associationName = associationType
                        .getAssociationName();
                if (fromAssociationType.getName().equals(
                        getPrincipal().getType().getName()))
                {
                    tab = new AbstractTab(new Model(toAssociationType.getName()
                            + " - " + associationType.getAssociationName()))
                    {

                        public Panel getPanel(String panelId)
                        {
                            return new AssociationTypePanel(panelId,
                                    tempAssociation);
                        }
                    };
                } else
                {
                    tab = new AbstractTab(new Model(fromAssociationType
                            .getName()
                            + " - " + associationType.getAssociationName()))
                    {

                        public Panel getPanel(String panelId)
View Full Code Here

        return principalList.subList(first, last).iterator();
    }

    public IModel model(JetspeedPrincipal object)
    {
        return new Model((Serializable) object);
    }
View Full Code Here

                protected void populateItem(ListItem item)
                {
                    final Map<String, SecurityAttribute> attributes = (Map<String, SecurityAttribute>) item
                            .getModelObject();
                    final SecurityAttribute attrib = attributes.get("value");
                    item.add(new TextField("name", new Model(attrib.getName()))
                    {

                        @Override
                        public boolean isEnabled()
                        {
View Full Code Here

        return this.cellWidth;
    }

    public void populateItem(Item item, String componentId, IModel model)
    {
        item.add(new AttributeModifier("width", true, new Model(getCellWidth())));
        item.add(new CheckBoxPanel(item, componentId, model));
    }
View Full Code Here

                }

                public IModel model(Object object)
                {
                    Map ruleMap = (Map) object;
                    return new Model((Serializable) ruleMap);
                }

                public Iterator iterator(int first, int count)
                {
                    return getUserRules().subList(first, first + count)
                            .iterator();
                }
            };
            IColumn[] columns =
            {
                    new CheckBoxPropertyColumn(new Model(" "), "checked"),
                    new PropertyColumn(new ResourceModel("user.ruleName"),
                            "rule.locatorName"),
                    new PropertyColumn(new ResourceModel("user.ruleValue"),
                            "rule.profilingRule")};
            DataTable userRulesDataTable = new DataTable("entries", columns,
View Full Code Here

        return this.cellWidth;
    }

    public void populateItem(Item item, String componentId, IModel model)
    {
        item.add(new AttributeModifier("width", true, new Model(getCellWidth())));
        item.add(new ImagePanel(item, componentId, model));
    }
View Full Code Here

TOP

Related Classes of org.apache.wicket.model.Model

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.