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


Java IAjaxCallDecorator类代码示例

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


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

示例1: AjaxDecoratedCheckbox

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
public AjaxDecoratedCheckbox(final String id, final IModel<Boolean> model) {
    super(id, model);

    add(new AjaxEventBehavior("onclick") {

        @Override
        protected void onEvent(final AjaxRequestTarget target) {
            onUpdate(target);
        }

        @Override
        protected IAjaxCallDecorator getAjaxCallDecorator() {
            return new CancelEventIfNoAjaxDecorator(
                    AjaxDecoratedCheckbox.this.getAjaxCallDecorator());
        }
    });
}
 
开发者ID:ilgrosso,项目名称:oldSyncopeIdM,代码行数:18,代码来源:AjaxDecoratedCheckbox.java

示例2: populateTreeItem

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
@Override
protected void populateTreeItem(final WebMarkupContainer item, int level) {
    super.populateTreeItem(item, level);
    item.get("nodeLink:label").add(new CssClass("node-label"));

    item.get("nodeLink").add(new AjaxEventBehavior("oncontextmenu") {
        @Override
        protected void onEvent(AjaxRequestTarget target) {
            onContextMenu(item, target);
        }

        @Override
        protected IAjaxCallDecorator getAjaxCallDecorator() {
            return new CancelDefaultDecorator();
        }
    });
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:18,代码来源:ActionableItemsTree.java

示例3: scheduleMessageFetch

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
private void scheduleMessageFetch() {
    add(new AbstractAjaxTimerBehavior(Duration.seconds(5)) {
        @Override
        protected IAjaxCallDecorator getAjaxCallDecorator() {
            return new NoAjaxIndicatorDecorator();
        }

        @Override
        protected void onTimer(AjaxRequestTarget target) {
            stop();
            final Message message = artifactoryUpdatesService.getCachedMessage();
            if (message != null && message != ArtifactoryUpdatesService.PROCESSING_MESSAGE) {
                setupMessage(message);
                target.add(ArtifactoryUpdatesPanel.this);
            }
        }
    });
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:19,代码来源:ArtifactoryUpdatesPanel.java

示例4: populateItem

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
@Override
protected void populateItem(final ListItem<T> item) {
    super.populateItem(item);
    item.add(new AjaxEventBehavior("ondblclick") {
        @SuppressWarnings({"unchecked"})
        @Override
        protected void onEvent(AjaxRequestTarget target) {
            ModalHandler modalHandler = ModalHandler.getInstanceFor(RepoListPanel.this);
            T itemObject = (T) item.getDefaultModelObject();
            modalHandler.setModalPanel(newUpdateItemPanel(itemObject));
            modalHandler.show(target);
        }

        @Override
        protected IAjaxCallDecorator getAjaxCallDecorator() {
            return new CancelDefaultDecorator();
        }
    });
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:20,代码来源:RepositoryConfigPage.java

示例5: newRowItem

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
@Override
protected Item<T> newRowItem(final String id, final int index, final IModel<T> model) {
    Item<T> item = super.newRowItem(id, index, model);
    if (canAddRowItemDoubleClickBehavior(model)) {

        item.add(new AjaxEventBehavior("ondblclick") {
            @Override
            protected void onEvent(AjaxRequestTarget target) {
                onRowItemEvent(id, index, model, target);
            }

            @Override
            protected IAjaxCallDecorator getAjaxCallDecorator() {
                return new CancelDefaultDecorator();
            }
        });
    }

    return item;
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:21,代码来源:BaseListPanel.java

示例6: addLinks

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
protected void addLinks(List<AbstractLink> links, final T itemObject, String linkId) {
    // add edit link
    TitledAjaxLink editLink = getEditItemLink(itemObject, linkId);
    editLink.add(new CssClass("icon-link"));
    editLink.add(new CssClass("UpdateAction"));
    links.add(editLink);

    // add delete link
    if (canAddDeleteItemLink(itemObject)) {
        TitledAjaxLink deleteLink = new TitledAjaxLink(linkId, "Delete") {
            @Override
            public void onClick(AjaxRequestTarget target) {
                deleteItem(itemObject, target);
                target.add(BaseListPanel.this);
            }

            @Override
            protected IAjaxCallDecorator getAjaxCallDecorator() {
                return new ConfirmationAjaxCallDecorator(getDeleteConfirmationText(itemObject));
            }
        };
        deleteLink.add(new CssClass("icon-link"));
        deleteLink.add(new CssClass("DeleteAction"));
        links.add(deleteLink);
    }
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:27,代码来源:BaseListPanel.java

示例7: newGroupByLink

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
private Component newGroupByLink(String id, final ISortStateLocator stateLocator, final String groupProperty) {
    return new AjaxLink(id) {
        @Override
        public void onClick(AjaxRequestTarget target) {
            if (stateLocator instanceof IGroupStateLocator) {
                IGroupStateLocator groupStateLocator = (IGroupStateLocator) stateLocator;
                switchGroupState(groupStateLocator, groupProperty);
                target.add(getTable());
            }
        }

        @Override
        protected void onComponentTag(ComponentTag tag) {
            super.onComponentTag(tag);
            tag.put("title", "Group By");
        }

        @Override
        protected IAjaxCallDecorator getAjaxCallDecorator() {
            return new CancelDefaultDecorator();
        }
    };
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:24,代码来源:AjaxGroupableHeadersToolbar.java

示例8: newCheckBox

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
@Override
protected FormComponent<Boolean> newCheckBox(String id, IModel<Boolean> model, final T rowObject) {
    final FormComponent<Boolean> checkbox = super.newCheckBox(id, model, rowObject);

    checkbox.add(new AjaxFormComponentUpdatingBehavior("onclick") {
        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            Boolean checked = checkbox.getModelObject();
            AjaxCheckboxColumn.this.onUpdate(checkbox, rowObject, checked, target);
        }

        @Override
        protected IAjaxCallDecorator getAjaxCallDecorator() {
            return AjaxCheckboxColumn.this.getAjaxCallDecorator();
        }
    });
    return checkbox;
}
 
开发者ID:alancnet,项目名称:artifactory,代码行数:19,代码来源:AjaxCheckboxColumn.java

示例9: createDeleteLink

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
@Override
protected WebMarkupContainer createDeleteLink(String id, final IModel entityModel, final int index) {
	return new AjaxLink(id) {
		@SuppressWarnings("unchecked")
		@Override
		public void onClick(AjaxRequestTarget target) {
			List<ConnectorInstanceMetaDTO> metas = (List<ConnectorInstanceMetaDTO>) MetaListPanel.this.getModelObject();
			metas.remove(index);
			target.addComponent(MetaListPanel.this);				
		}

		@Override
		protected IAjaxCallDecorator getAjaxCallDecorator() {
			return new AjaxCallDecorator() {
				@Override
				public CharSequence decorateScript(CharSequence script) {
					String confirmMsg = getLocalizer().getString("confirmDelete", MetaListPanel.this);
					return "if (confirm('" + confirmMsg + "')) {" + script + "} else { return false; }";
				}
			};
		}
	};
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:24,代码来源:MetaListPanel.java

示例10: createDeleteLink

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
@Override
protected WebMarkupContainer createDeleteLink(String id, final IModel entityModel, final int index) {
	return new AjaxLink(id) {
		@SuppressWarnings("unchecked")
		@Override
		public void onClick(AjaxRequestTarget target) {
			List<CopyFieldDTO> copyFields = (List<CopyFieldDTO>) CopyFieldListPanel.this.getModelObject();
			copyFields.remove(index);
			target.addComponent(CopyFieldListPanel.this);				
		}

		@Override
		protected IAjaxCallDecorator getAjaxCallDecorator() {
			return new AjaxCallDecorator() {
				@Override
				public CharSequence decorateScript(CharSequence script) {
					String confirmMsg = getLocalizer().getString("confirmDelete", CopyFieldListPanel.this);
					return "if (confirm('" + confirmMsg + "')) {" + script + "} else { return false; }";
				}
			};
		}
	};
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:24,代码来源:CopyFieldListPanel.java

示例11: createDeleteLink

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
protected WebMarkupContainer createDeleteLink(String id, final IModel rowItemModel, final int index) {
    return new AjaxLink(id) {
        @Override
        public void onClick(AjaxRequestTarget target) {
            onClickDeleteLink(rowItemModel, target, index);
        }

        @Override
        protected IAjaxCallDecorator getAjaxCallDecorator() {
            return new AjaxCallDecorator() {
                @Override
                public CharSequence decorateScript(CharSequence script) {
                    String confirmMsg = getLocalizer().getString("confirmDelete", CRUDPanel.this);
                    return "if (confirm('" + confirmMsg + "')) {" + script + "} else { return false; }";
                }
            };
        }

        @Override
        public boolean isVisible() {
            return super.isVisible() && isDeleteLink(rowItemModel, index);
        }
    };
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:25,代码来源:CRUDPanel.java

示例12: createDeleteLink

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
@Override
protected WebMarkupContainer createDeleteLink(String id, final IModel entityModel, final int index) {
	return new AjaxLink(id) {
		@Override
		public void onClick(AjaxRequestTarget target) {
			AddEditGroupPanel addEditGroupPanel = (AddEditGroupPanel) findParent(AddEditGroupPanel.class);
			addEditGroupPanel.getParticipations().remove(index);
			target.addComponent(ParticipationListPanel.this);				
		}

		@Override
		protected IAjaxCallDecorator getAjaxCallDecorator() {
			return new AjaxCallDecorator() {
				@Override
				public CharSequence decorateScript(CharSequence script) {
					String confirmMsg = getLocalizer().getString("confirmDelete", ParticipationListPanel.this);
					return "if (confirm('" + confirmMsg + "')) {" + script + "} else { return false; }";
				}
			};
		}
	};
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:23,代码来源:ParticipationListPanel.java

示例13: createDeleteLink

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
@Override
protected WebMarkupContainer createDeleteLink(String id, final IModel entityModel, final int index) {
	return new AjaxLink(id) {
		@Override
		public void onClick(AjaxRequestTarget target) {
			AddEditAnalyzerFieldPanel addEditAnalyzerFieldPanel = (AddEditAnalyzerFieldPanel) findParent(AddEditAnalyzerFieldPanel.class);
			addEditAnalyzerFieldPanel.getFilters().remove(index);
			target.addComponent(FilterListPanel.this);				
		}

		@Override
		protected IAjaxCallDecorator getAjaxCallDecorator() {
			return new AjaxCallDecorator() {
				@Override
				public CharSequence decorateScript(CharSequence script) {
					String confirmMsg = getLocalizer().getString("confirmDelete", FilterListPanel.this);
					return "if (confirm('" + confirmMsg + "')) {" + script + "} else { return false; }";
				}
			};
		}
	};
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:23,代码来源:FilterListPanel.java

示例14: createDeleteLink

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
@Override
protected WebMarkupContainer createDeleteLink(String id, final IModel entityModel, final int index) {
	return new AjaxLink(id) {
		@Override
		public void onClick(AjaxRequestTarget target) {
			AddEditCategorizationRulePanel addEditCategorizationRulePanel = 
				(AddEditCategorizationRulePanel) findParent(AddEditCategorizationRulePanel.class);
			addEditCategorizationRulePanel.getValues().remove(index);
			target.addComponent(CategorizationRuleValueListPanel.this);				
		}

		@Override
		protected IAjaxCallDecorator getAjaxCallDecorator() {
			return new AjaxCallDecorator() {
				@Override
				public CharSequence decorateScript(CharSequence script) {
					String confirmMsg = getLocalizer().getString("confirmDelete", CategorizationRuleValueListPanel.this);
					return "if (confirm('" + confirmMsg + "')) {" + script + "} else { return false; }";
				}
			};
		}
	};
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:24,代码来源:CategorizationRuleValueListPanel.java

示例15: createDeleteLink

import org.apache.wicket.ajax.IAjaxCallDecorator; //导入依赖的package包/类
@Override
protected WebMarkupContainer createDeleteLink(String id, final IModel entityModel, final int index) {
	return new AjaxLink(id) {
		@Override
		public void onClick(AjaxRequestTarget target) {
			AddEditCategorizationPanel addEditCategorizationPanel = (AddEditCategorizationPanel) findParent(AddEditCategorizationPanel.class);
			addEditCategorizationPanel.getRules().remove(index);
			target.addComponent(CategorizationRuleListPanel.this);				
		}

		@Override
		protected IAjaxCallDecorator getAjaxCallDecorator() {
			return new AjaxCallDecorator() {
				@Override
				public CharSequence decorateScript(CharSequence script) {
					String confirmMsg = getLocalizer().getString("confirmDelete", CategorizationRuleListPanel.this);
					return "if (confirm('" + confirmMsg + "')) {" + script + "} else { return false; }";
				}
			};
		}
	};
}
 
开发者ID:BassJel,项目名称:Jouve-Project,代码行数:23,代码来源:CategorizationRuleListPanel.java


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