當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。