当前位置: 首页>>代码示例>>Java>>正文


Java AjaxLink类代码示例

本文整理汇总了Java中org.apache.wicket.ajax.markup.html.AjaxLink的典型用法代码示例。如果您正苦于以下问题:Java AjaxLink类的具体用法?Java AjaxLink怎么用?Java AjaxLink使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AjaxLink类属于org.apache.wicket.ajax.markup.html包,在下文中一共展示了AjaxLink类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createCloseButton

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
private void createCloseButton(boolean visible) {
    closeLink = new AjaxLink("close") {
        @Override
        public void onClick(AjaxRequestTarget target) {
            workflowService.changeState(docData, StateEnum.CLOSED, user);

            stateLabel.setDefaultModel(new Model(workflow.getState().getCurrentState().getName()));
            
            setVisibility(false, closeLink, submitLink, startProgressLink, signLink, releaseLink, 
                    approveLink, declineLink, documentLabels.getSubmittedlabel(),
                    documentLabels.getFreezedLabel());
            reopenLink.setVisible(true);
            
            tabs.refreshTabs(docData.getMetadata().getRev());
            documentLabels.refreshLabels(docData.getWorkflow(), target);
            
            target.add(stateLabel, closeLink, submitLink, startProgressLink, signLink,
                    reopenLink, approveLink, declineLink, documentLabels, releaseLink, tabs);
        }
    };
    addComponent(closeLink, visible);
}
 
开发者ID:martin-kanis,项目名称:relax-dms,代码行数:23,代码来源:DocumentWorkflow.java

示例2: populateItem

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
@Override
protected void populateItem(Item<Var> item) {
    String name = item.getModel().getObject().getName();
    item.add(new AjaxLink("show") {
        @Override
        public void onClick(AjaxRequestTarget target) {
            selectedName = name;
            Component headerPanel = getPage().get(BasePage.STICKY_HEADER_ID);
            VarModel varModel = new VarModel(model.getSessionId(), name);
            VarPanel varPanel = new VarPanel(BasePage.STICKY_HEADER_ID, varModel, VarsRefreshingView.this);                
            headerPanel = headerPanel.replaceWith(varPanel);
            target.add(headerPanel);
            Component varsPanel = getPage().get(BasePage.LEFT_NAV_ID);
            target.add(varsPanel);
        }
    }.add(new Label("name", name)));
    String type = item.getModel().getObject().getValue().getTypeAsShortString();
    item.add(new Label("type", type));
    if (name.equals(selectedName)) {
        item.add(new AttributeModifier("class", "success"));
    }
}
 
开发者ID:intuit,项目名称:karate,代码行数:23,代码来源:VarsRefreshingView.java

示例3: render

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
@Override
public Component render(String componentId) {
	return new ActionTabLink(componentId, this) {

		@Override
		protected WebMarkupContainer newLink(String id, ActionTab tab) {
			return new AjaxLink<Void>("link") {

				@Override
				public void onClick(AjaxRequestTarget target) {
					selectTab(this);
				}
				
			};
		}
		
	};
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:19,代码来源:AjaxActionTab.java

示例4: newAddReplyContainer

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
private WebMarkupContainer newAddReplyContainer() {
	WebMarkupContainer addReplyContainer = new Fragment("addReply", "addReplyFrag", this) {

		@Override
		protected void onConfigure() {
			super.onConfigure();
			setVisible(SecurityUtils.getUser() != null);
		}
		
	};
	addReplyContainer.setOutputMarkupId(true);
	addReplyContainer.add(new AjaxLink<Void>("reply") {

		@Override
		public void onClick(AjaxRequestTarget target) {
			onAddReply(target, false, null);
		}
		
	});
	return addReplyContainer;
}
 
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:22,代码来源:CodeCommentPanel.java

示例5: populateCrawlRow

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
private void populateCrawlRow(Item<Crawl> item) {
  item.add(new AjaxLink<Crawl>("edit", item.getModel()) {
    @Override
    public void onClick(AjaxRequestTarget target) {
      editCrawl(target, getModel());
    }
  }.add(new Label("crawlName")));
  item.add(new Label("seedList.name"));

  item.add(new Label("progress"));
  item.add(createStatusLabel());
  item.add(new Link<Crawl>("start", item.getModel()) {
    @Override
    public void onClick() {
      crawlService.startCrawl(getModelObject().getId(), getCurrentInstance());
    }
  });

  item.add(new Link<Crawl>("delete", item.getModel()) {
    @Override
    public void onClick() {
      crawlService.deleteCrawl(getModelObject().getId());
    }
  });
}
 
开发者ID:jorcox,项目名称:GeoCrawler,代码行数:26,代码来源:CrawlsPage.java

示例6: initLayout

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
public void initLayout(final String messageKey){
    WebMarkupContainer content = new WebMarkupContainer(ID_CONTENT);
    add(content);

    Label helpLabel = new Label(ID_HELP, new AbstractReadOnlyModel<String>() {

        @Override
        public String getObject() {
            return getString(messageKey);
        }
    });
    helpLabel.setEscapeModelStrings(false);
    content.add(helpLabel);

    AjaxLink ok = new AjaxLink(ID_BUTTON_OK) {

        @Override
        public void onClick(AjaxRequestTarget target) {
            closePerformed(target);
        }
    };
    content.add(ok);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:24,代码来源:HelpInfoPanel.java

示例7: initButtons

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
protected void initButtons(ListItem<T> item, WebMarkupContainer parent) {
        WebMarkupContainer buttonGroup = new WebMarkupContainer(ID_BUTTON_GROUP); {
	        buttonGroup.setOutputMarkupId(true);
	
	        AjaxLink remove = new AjaxLink(ID_REMOVE) {
	
	            @Override
	            public void onClick(AjaxRequestTarget target) {
	                removeValuePerformed(target, item.getModelObject());
	            }
	        };
	        
	        remove.add(new VisibleEnableBehaviour() {
	
	            @Override
	            public boolean isVisible() {
	                return isRemoveButtonVisible();
	            }
	        });
	        buttonGroup.add(remove);
        }

        parent.add(buttonGroup);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:25,代码来源:MultiValueChoosePanel.java

示例8: initLayout

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
private void initLayout() {
    setOutputMarkupId(true);
    ListView<PrismObject<R>> list = new ListView<PrismObject<R>>(ID_LIST, availableRoles) {
        @Override
        protected void populateItem(ListItem<PrismObject<R>> item) {
            item.add(createRoleLink(ID_ITEM, item.getModel()));
        }
    };
    list.setOutputMarkupId(true);
    add(list);

    AjaxLink<String> buttonReset = new AjaxLink<String>(ID_BUTTON_RESET) {
        @Override
        public void onClick(AjaxRequestTarget target) {
            reset();
            target.add(SimpleRoleSelector.this);
        }
    };
    buttonReset.setBody(createStringResource("SimpleRoleSelector.reset"));
    add(buttonReset);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:22,代码来源:SimpleRoleSelector.java

示例9: initLayout

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
private void initLayout(IModel<String> model, IModel<String> titleModel) {
    AjaxLink link = new AjaxLink(ID_LINK) {

        @Override
        public void onClick(AjaxRequestTarget target) {
            onClickPerformed(target);
        }
    };

    Label image = new Label(ID_IMAGE);
    image.add(AttributeModifier.replace("class", model));
    if (titleModel != null) {
        image.add(AttributeModifier.replace("title", titleModel));
    }
    link.add(image);
    link.setOutputMarkupId(true);
    add(link);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:19,代码来源:LinkIconPanel.java

示例10: initLayout

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
protected void initLayout() {
    WebMarkupContainer cogButton = new WebMarkupContainer(ID_COG_BUTTON);
    cogButton.setOutputMarkupId(true);
    add(cogButton);

    WebMarkupContainer pageSize = new WebMarkupContainer(ID_PAGE_SIZE);
    pageSize.setOutputMarkupId(true);
    cogButton.add(pageSize);

    AjaxLink tableColumns = new AjaxLink(ID_TABLE_COLUMNS) {

        @Override
        public void onClick(AjaxRequestTarget target) {
            tableColumnsPerformed(target);
        }
    };
    cogButton.add(tableColumns);
    tableColumns.setVisible(false); //todo implement [lazyman]

    initPopoverLayout();
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:22,代码来源:TableConfigurationPanel.java

示例11: initLayout

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
public void initLayout(WebMarkupContainer content){
    Label helpLabel = new Label(ID_HELP, new AbstractReadOnlyModel<String>() {

        @Override
        public String getObject() {
            return getString(determineHelpKey());
        }
    });
    helpLabel.setEscapeModelStrings(false);
    content.add(helpLabel);

    AjaxLink ok = new AjaxLink(ID_BUTTON_OK) {

        @Override
        public void onClick(AjaxRequestTarget target) {
            closePerformed(target);
        }
    };
    content.add(ok);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:21,代码来源:WizardHelpDialog.java

示例12: createCapabilityButton

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
private void createCapabilityButton(String id) {
	AjaxLink<Boolean> button = new AjaxLink<Boolean>(id, new PropertyModel<Boolean>(getModel(), id)) {

		@Override
		public void onClick(AjaxRequestTarget target) {
			// TODO:
		}

	};

	button.add(new AttributeModifier("class",
			button.getModelObject() ? "btn btn-app btn-resource-capability bg-light-blue"
					: "btn btn-app btn-resource-capability bg-gray text-light-blue"));

	button.add(new Label("label", new ResourceModel("CapabilitiesType." + id)));

	add(button);
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:19,代码来源:CapabilitiesPanel.java

示例13: addDeleteDependencyButton

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
/**
 * Create and add a link to delete the selected attribute dependency.
 */
private void addDeleteDependencyButton() {
    AjaxLink deleteDependencyButton = new AjaxLink<Void>("deleteDependencyButton") {
        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(final AjaxRequestTarget target) {
            AttributeDependency dependency = AttributeDependency
                    .getAttributeDependencyIfExists(selectedEventType, selectedBaseAttribute, selectedDependentAttribute);
            if (dependency == null) {
                DependenciesPanel.this.page.getFeedbackPanel().error("Error while deleting dependency. "
                        + "Dependency is already deleted.");
            } else if (dependency.remove() == null) {
                DependenciesPanel.this.page.getFeedbackPanel().error("Error while deleting dependency. "
                        + "Please delete the corresponding values first.");
            } else {
                DependenciesPanel.this.page.getFeedbackPanel().success("Dependency deleted.");
            }
            target.add(DependenciesPanel.this.page.getFeedbackPanel());
        }
    };
    dependencyForm.add(deleteDependencyButton);
}
 
开发者ID:bptlab,项目名称:Unicorn,代码行数:26,代码来源:DependenciesPanel.java

示例14: UriResponsePanel

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
public UriResponsePanel(String id, IModel<UriListRepresentationModel> representationModel) {
    super(id);

    this.add(new ListView<String>("uriList", new ListModel<>(representationModel.getObject().getUriList())) {
        @Override
        protected void populateItem(ListItem<String> listItem) {
            AjaxLink link = new AjaxLink("uri") {
                @Override
                public void onClick(AjaxRequestTarget target) {
                    try {
                        XmppURI uri = new XmppURI(listItem.getModelObject());
                        setResponsePage(new BrowserPage(Model.of(uri)));
                    } catch (URISyntaxException e) {
                        logger.error("Could not parse Xmpp Uri. {}", listItem.getModelObject(), e);
                        target.appendJavaScript("alert('Could not parse Xmpp Uri.');");
                    }
                }
            };
            link.setBody(listItem.getModel());
            listItem.add(link);
        }
    });
}
 
开发者ID:citlab,项目名称:Intercloud,代码行数:24,代码来源:UriResponsePanel.java

示例15: create

import org.apache.wicket.ajax.markup.html.AjaxLink; //导入依赖的package包/类
@Override
public AjaxLink<T> create(String wicketId, final IModel<T> parameter) {
	AjaxLink<T> link = new AjaxLink<T>(wicketId, parameter) {
		private static final long serialVersionUID = 1L;
		@Override
		protected void updateAjaxAttributes(AjaxRequestAttributes attributes) {
			super.updateAjaxAttributes(attributes);
			action.updateAjaxAttributes(attributes, parameter);
		}
		@Override
		public void onClick(AjaxRequestTarget target) {
			action.execute(target, parameter);
		}
	};
	
	link.add(
			action.getActionAvailableCondition(parameter).thenShowInternal()
	);
	
	return link;
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:22,代码来源:ActionColumnAjaxActionFactory.java


注:本文中的org.apache.wicket.ajax.markup.html.AjaxLink类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。