Package org.apache.wicket.model

Examples of org.apache.wicket.model.ResourceModel


            Label visibleLabel = new Label("visible", "Hidden");
            CheckBox visibleCheckbox = new CheckBox("visibleCheck",
                    new PropertyModel(this, "document.hidden"));
            infoForm.add(visibleLabel);
            infoForm.add(visibleCheckbox);
            infoForm.add(new AjaxButton("new",new ResourceModel("add.page"),infoForm)
            {

                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
View Full Code Here


            Label visibleLabel = new Label("visible", "Hidden");
            CheckBox visibleCheckbox = new CheckBox("visibleCheck",
                    new PropertyModel(this, "document.hidden"));
            infoForm.add(visibleLabel);
            infoForm.add(visibleCheckbox);
            infoForm.add(new AjaxButton("new",new ResourceModel("add.link"),infoForm)
            {

                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
View Full Code Here

            Label shortTitleLabel = new Label("shortTitle", "ShortTitle");
            TextField shortTitleField = new TextField("shortTitleField",
                    new PropertyModel(this, "document.shortTitle"));
            infoForm.add(shortTitleField);
            infoForm.add(shortTitleLabel);
            infoForm.add(new AjaxButton("new",new ResourceModel("add.subfolder"),infoForm)
            {

                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
View Full Code Here

            final ModalWindow metaDataModalWindow;
            add(metaDataModalWindow = new ModalWindow("modalwindow"));
            final WebMarkupContainer ajaxPanel = new WebMarkupContainer(
                    "basePanel");
            ajaxPanel.setOutputMarkupId(true);
            ajaxPanel.add(new Label("nameLabel",new ResourceModel("common.name")));
            ajaxPanel.add(new ListView("menuData", new PropertyModel(this,
                    "menuOptions"))
            {

                public void populateItem(final ListItem listItem)
                {
                    final MenuExcludeDefinition option = (MenuExcludeDefinition) listItem
                            .getModelObject();
                    listItem.add(new Label("name", option.getName()));
                    AjaxLink editLink = new AjaxLink("edit")
                    {

                        @Override
                        public void onClick(AjaxRequestTarget target)
                        {
                            metaDataModalWindow.setContent(new ExcludesWindow(
                                    metaDataModalWindow.getContentId(),option, ajaxPanel));
                            metaDataModalWindow.show(target);
                        }
                    };
                    editLink.add(new Label("editLabel",new ResourceModel("common.edit")));
                    listItem.add(editLink);
                    AjaxLink deleteLink = new AjaxLink("delete")
                    {
                        @Override
                        public void onClick(AjaxRequestTarget target)
                        {
                            menuActions(REMOVE_ACTION,option.getName(), new ExcludesDefinitionBean());
                            target.addComponent(ajaxPanel);
                        }
                    };
                    deleteLink.add(new JavascriptEventConfirmation("onclick",
                            new ResourceModel("action.delete.confirm")));
                    deleteLink.add(new Label("deleteLabel",new ResourceModel("common.delete")));
                    listItem.add(deleteLink);
                }
            });
            Form excludeForm = new Form("excludeForm");
            add(excludeForm);
            add(new AjaxButton("new",new ResourceModel("common.new"),excludeForm)
            {
                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    MenuExcludeDefinition excludeDefinition = null;
View Full Code Here

            final ModalWindow metaDataModalWindow;
            add(metaDataModalWindow = new ModalWindow("modalwindow"));
            final WebMarkupContainer ajaxPanel = new WebMarkupContainer(
                    "basePanel");
            ajaxPanel.setOutputMarkupId(true);
            ajaxPanel.add(new Label("nameLabel",new ResourceModel("common.name")));
            ajaxPanel.add(new Label("nestedLabel",new ResourceModel("menu.nest.label")));
            ajaxPanel.add(new ListView("menuData", new PropertyModel(this,
                    "menuOptions"))
            {

                public void populateItem(final ListItem listItem)
                {
                    final MenuIncludeDefinition option = (MenuIncludeDefinition) listItem
                            .getModelObject();
                    listItem.add(new Label("name", option.getName()));
                    listItem.add(new Label("nest", Boolean.toString(option
                            .isNest())));
                    AjaxLink editLink =new AjaxLink("edit")
                    {

                        @Override
                        public void onClick(AjaxRequestTarget target)
                        {
                            metaDataModalWindow.setContent(new IncludesWindow(
                                    metaDataModalWindow.getContentId(),option, ajaxPanel));
                            metaDataModalWindow.show(target);
                        }
                    };
                    editLink.add(new Label("editLabel",new ResourceModel("common.edit")));
                    listItem.add(editLink);
                    AjaxLink deleteLink = new AjaxLink("delete")
                    {

                        @Override
                        public void onClick(AjaxRequestTarget target)
                        {
                            menuActions(REMOVE_ACTION,option.getName(),new IncludesDefinitionBean());
                            target.addComponent(ajaxPanel);
                        }
                    };
                    deleteLink.add(new JavascriptEventConfirmation("onclick",new ResourceModel("action.delete.confirm")));
                    deleteLink.add(new Label("deleteLabel",new ResourceModel("common.delete")));
                    listItem.add(deleteLink);                   
                }
            });
            add(new AjaxLink("new")
            {
View Full Code Here

                        {
                            menuActions(REMOVE_ACTION,option.getOptions(), new OptionsDefinitionBean());
                            target.addComponent(ajaxPanel);
                        }
                    }.add(new JavascriptEventConfirmation("onclick",
                            new ResourceModel("action.delete.confirm"))));
                }
            });
            add(new AjaxLink("new")
            {
View Full Code Here

                {
                }
            };
            copyForm.add(copyIdsChkBox);
           
            AjaxButton copyButton = new AjaxButton("copy",new ResourceModel("common.copy"),copyForm)
            {

                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
                    docAction(true, docOldName, getDocName(), docOldPath, getDocPath(), getCopyIds());
                    ((ModalWindow) CopyMoveWindow.this.getParent()).close(target);
                }

                @Override
                protected void onError(AjaxRequestTarget target, Form<?> form)
                {
                    target.addComponent(feedback);
                }
            };
           
            AjaxButton moveButton = new AjaxButton("move",new ResourceModel("common.move"), copyForm)
            {

                @Override
                protected void onSubmit(AjaxRequestTarget target, Form<?> form)
                {
View Full Code Here

    {
        PortletRequest request = ((AbstractAdminWebApplication) getApplication()).getPortletRequest();
        treeRoot = request.getPreferences().getValue(PortalSiteManager.TREE_ROOT, "/");
        add(new FeedbackPanel("feedback"));
        Form userPrefernces = new Form("userPrefernces");
        userPrefernces.add(new Label("treerootLabel", new ResourceModel("treeroot")));
        userPrefernces.add(new TextField("treeroot", new PropertyModel(this, "treeRoot")).setRequired(true));
        userPrefernces.add(new Button("addUserPrefernces", new ResourceModel("common.save"))
        {
            @Override
            public void onSubmit()
            {
                PortletRequest request = ((AbstractAdminWebApplication) getApplication()).getPortletRequest();
View Full Code Here

  {
    // this method test the use of wrapped models in options
    OptionsTestPanel panel = new OptionsTestPanel("panel");
    Options options = panel.getOptions();
    // put an IComponentAssignedModel
    options.putString("test", new ResourceModel("key"));
    options.putString("test1", new Model<String>("Test1"));
    options.put("test2", false);
    OptionsTestPage page = new OptionsTestPage(panel);
    page = (OptionsTestPage) tester.startPage(page);
    String expectedResult = "Test";
View Full Code Here

        PortletDefinition def = app.getPortlet(paNodeBean.getName());
        jetspeedSecurityConstraint = def.getJetspeedSecurityConstraint();
       
        Form form = (Form) panel.get("form");
        form.add(new DropDownChoice<String>("jetspeedConstraint", new PropertyModel<String>(this, "jetspeedSecurityConstraint"), jetspeedSecurityContraintNames));
        form.add(new Button("jsecSave", new ResourceModel("pam.details.action.save"))
        {
            @Override
            public void onSubmit()
            {
                FeedbackPanel feed = (FeedbackPanel) getPage().get("feedback");
View Full Code Here

TOP

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

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.