本文整理汇总了Java中org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel类的典型用法代码示例。如果您正苦于以下问题:Java AjaxEditableLabel类的具体用法?Java AjaxEditableLabel怎么用?Java AjaxEditableLabel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AjaxEditableLabel类属于org.apache.wicket.extensions.ajax.markup.html包,在下文中一共展示了AjaxEditableLabel类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getAjaxEditableLabelColumn
import org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel; //导入依赖的package包/类
private IColumn getAjaxEditableLabelColumn(final String propertyName) {
return new AbstractColumn(new StringResourceModel(propertyName, this, null)) {
@Override
public void populateItem(Item cellItem, String componentId, IModel rowModel) {
ConnectorTypeMetaMapping metaMapping = (ConnectorTypeMetaMapping) rowModel.getObject();
final ReloadableEntityModel<ConnectorTypeMetaMapping> entityModel =
new ReloadableEntityModel<ConnectorTypeMetaMapping>(metaMapping);
cellItem.setModel(new CompoundPropertyModel(entityModel));
cellItem.add(new AjaxEditableLabel(componentId, new PropertyModel(entityModel, propertyName)) {
@Override
protected void onSubmit(AjaxRequestTarget target) {
updateMetaMapping(entityModel.getObject(), target);
super.onSubmit(target);
}
@Override
public void detachModels() {
entityModel.detach();
super.detachModels();
}
});
}
};
}
示例2: add
import org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel; //导入依赖的package包/类
/**
* @param id
* @param ajaxEditableLabel
* @return The created AjaxEditableLabelPanel.
* @see SelectPanel#SelectPanel(String, Select)
*/
public <C> AjaxEditableLabelPanel<C> add(final AjaxEditableLabel<C> ajaxEditableLabel)
{
final AjaxEditableLabelPanel<C> ajaxEditableLabelPanel = new AjaxEditableLabelPanel<C>(newChildId(), ajaxEditableLabel);
add(ajaxEditableLabelPanel);
return ajaxEditableLabelPanel;
}
示例3: FeaturePanel
import org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel; //导入依赖的package包/类
public FeaturePanel(String id, String sessionId) {
super(id);
FeatureModel model = new FeatureModel(sessionId);
setDefaultModel(new CompoundPropertyModel(model));
add(new Label("feature", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return model.getObject().getEnv().featureName;
}
}));
add(new AjaxEditableLabel("env", new IModel<String>() {
@Override
public String getObject() {
return model.getObject().getEnv().env;
}
@Override
public void setObject(String object) {
service.updateSessionEnv(sessionId, object);
}
@Override
public void detach() {
}
}));
add(new BookmarkablePageLink("home", HomePage.class));
add(new IndicatingAjaxLink("export") {
@Override
public void onClick(AjaxRequestTarget target) {
KarateSession session = service.getSession(sessionId);
FeatureWrapper featureWrapper = session.getFeature();
FeaturePanel.this.setResponsePage(new HomePage(featureWrapper.getText()));
}
});
ListView<FeatureSection> listView = new ListView<FeatureSection>("sections") {
@Override
protected void populateItem(ListItem<FeatureSection> li) {
FeatureSection section = li.getModelObject();
FeatureSectionModel sectionModel = new FeatureSectionModel(sessionId, section);
li.add(new FeatureSectionPanel("section", sectionModel));
}
};
add(listView);
}
示例4: AjaxEditableLabelPanel
import org.apache.wicket.extensions.ajax.markup.html.AjaxEditableLabel; //导入依赖的package包/类
public AjaxEditableLabelPanel(final String id, final AjaxEditableLabel<T> ajaxEditableLabel)
{
super(id);
add(this.ajaxEditableLabel = ajaxEditableLabel);
}