【发布时间】:2020-05-21 04:07:02
【问题描述】:
我正在尝试使用 AjaxLink 更改检票口中按钮上的文本,但它不起作用,请问有什么帮助吗?这是我的代码;
<form name="depForm" wicket:id="depSummaryForm" action="">
<div class="uw_summary"> <div class="buttonContainer">
<span class="button_v2" wicket:id="newRecruitContainer">
<button class="internal_button" wicket:id="newRecruitEWLButton"
type="button"> Create New Recruit EWL </button> </span>
final WebMarkupContainer newRecruitContainer = new
WebMarkupContainer("newRecruitContainer")
{
Label buttonlabel = new Label("newRecruitEWLButton", Model.of(" "));
buttonlabel.setOutputMarkupPlaceholderTag(true);
AjaxLink newRecruitEWLButton = new AjaxLink("newRecruitEWLButton") {
@Override public void onClick(AjaxRequestTarget target) {
buttonlabel.setDefaultModelObject(Model.of("Creating EWL"));
target.add(buttonlabel); boolean isWorkItemCreated =
NewRecruitEWLUtil.createNewRecruitWorkItem(appInfo); } };
【问题讨论】:
标签: wicket