本文整理汇总了Java中org.apache.wicket.markup.repeater.OddEvenItem类的典型用法代码示例。如果您正苦于以下问题:Java OddEvenItem类的具体用法?Java OddEvenItem怎么用?Java OddEvenItem使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OddEvenItem类属于org.apache.wicket.markup.repeater包,在下文中一共展示了OddEvenItem类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: newRowItem
import org.apache.wicket.markup.repeater.OddEvenItem; //导入依赖的package包/类
@Override
@SuppressWarnings( { "rawtypes", "unchecked" })
protected Item<T> newRowItem(String id, int index, final IModel<T> model) {
Class clazz = rowItemClass != null ? rowItemClass : OddEvenItem.class;
Item<T> item = (Item<T>) ReflectionUtil.newInstance(clazz,
new Class[] { String.class, int.class, IModel.class }, new Object[] { id, index, model });
// Add event listeners to each row
// Doubleclick listener
DblClickAjaxEventBehavior<T> newOnDblClicktEvent = this.newOnDblClickEvent(model);
if (newOnDblClicktEvent != null)
item.add(newOnDblClicktEvent);
// Singleclick listener
ClickAjaxEventBehavior<T> newOnClickEvent = this.newOnClickEvent(model);
if (newOnClickEvent != null)
item.add(newOnClickEvent);
return item;
}
示例2: newRowItem
import org.apache.wicket.markup.repeater.OddEvenItem; //导入依赖的package包/类
@Override
protected Item<T> newRowItem(String id, int index, final IModel<T> model) {
Class clazz = rowItemClass != null ? rowItemClass : OddEvenItem.class;
Item<T> item = (Item<T>) ReflectionUtil.newInstance(clazz,
new Class[] { String.class, int.class, IModel.class }, new Object[] { id, index, model });
// Add event listeners to each row
// Doubleclick listener
DblClickAjaxEventBehavior<T> newOnDblClicktEvent = this.newOnDblClickEvent(model);
if (newOnDblClicktEvent != null)
item.add(newOnDblClicktEvent);
// Singleclick listener
ClickAjaxEventBehavior<T> newOnClickEvent = this.newOnClickEvent(model);
if (newOnClickEvent != null)
item.add(newOnClickEvent);
return item;
}
示例3: newRowItem
import org.apache.wicket.markup.repeater.OddEvenItem; //导入依赖的package包/类
@Override
protected Item<T> newRowItem(String id, int index, IModel<T> model) {
OddEvenItem<T> rowItem = new OddEvenItem<>(id, index, model);
rowItem.add(new JavascriptEvent("onmouseover", "DomUtils.addHoverStyle(this);"));
rowItem.add(new JavascriptEvent("onmouseout", "DomUtils.removeHoverStyle(this);"));
return rowItem;
}
示例4: newRowItem
import org.apache.wicket.markup.repeater.OddEvenItem; //导入依赖的package包/类
@Override
@SuppressWarnings( { "rawtypes", "unchecked" })
protected Item<T> newRowItem(final String id, final int index, final IModel<T> model) {
Class clazz = rowItemClass != null ? rowItemClass : OddEvenItem.class;
return (Item<T>) ReflectionUtil.newInstance(clazz, new Class[] { String.class, int.class, IModel.class },
new Object[] { id, index, model });
}
示例5: newRowItem
import org.apache.wicket.markup.repeater.OddEvenItem; //导入依赖的package包/类
@Override
protected Item<T> newRowItem(final String id, final int index, final IModel<T> model) {
return new OddEvenItem<T>(id, index, model);
}
示例6: newRowItem
import org.apache.wicket.markup.repeater.OddEvenItem; //导入依赖的package包/类
@Override
protected Item<Object> newRowItem(final String id, final int index, final IModel<Object> model) {
return new OddEvenItem<Object>(id, index, model);
}
示例7: newRowItem
import org.apache.wicket.markup.repeater.OddEvenItem; //导入依赖的package包/类
@Override
protected Item<T> newRowItem(final String id, final int index, final IModel<T> model)
{
return new OddEvenItem<>(id, index, model);
}
示例8: newRowItem
import org.apache.wicket.markup.repeater.OddEvenItem; //导入依赖的package包/类
@Override
protected Item<T> newRowItem(final String id, final int index, final IModel<T> model)
{
return new OddEvenItem<T>(id, index, model);
}
示例9: onCheckboxUpdate
import org.apache.wicket.markup.repeater.OddEvenItem; //导入依赖的package包/类
private void onCheckboxUpdate(FormComponent checkbox, AjaxRequestTarget target) {
final MarkupContainer row = checkbox.findParent(OddEvenItem.class);
target.addChildren(row, StyledCheckbox.class);
}
示例10: newRowItem
import org.apache.wicket.markup.repeater.OddEvenItem; //导入依赖的package包/类
@Override
protected Item newRowItem(String id, int index, IModel model) {
return new OddEvenItem(id, index, model);
}
示例11: newRowItem
import org.apache.wicket.markup.repeater.OddEvenItem; //导入依赖的package包/类
@Override
protected Item<T> newRowItem(final String id, final int index, final IModel<T> model) {
final OddEvenItem<T> item = new OddEvenItem<>(id, index, model);
if (togglePanel != null) {
final ActionsPanel<T> actions = getActions(model);
if (actions != null && !actions.isEmpty()) {
item.add(new AttributeModifier("style", "cursor: pointer;"));
item.add(new AjaxEventBehavior(Constants.ON_CLICK) {
private static final long serialVersionUID = 1L;
@Override
protected String findIndicatorId() {
return StringUtils.EMPTY;
}
@Override
protected void onEvent(final AjaxRequestTarget target) {
final String lastFocussedElementId = target.getLastFocusedElementId();
if (lastFocussedElementId == null) {
togglePanel.toggleWithContent(target, getActions(model), model.getObject());
} else {
final AjaxDataTablePanel<?, ?> parent = findParent(AjaxDataTablePanel.class);
final Model<Boolean> isCheck = Model.<Boolean>of(Boolean.FALSE);
parent.visitChildren(CheckGroupSelector.class, (selector, ivisit) -> {
if (selector.getMarkupId().equalsIgnoreCase(lastFocussedElementId)) {
isCheck.setObject(Boolean.TRUE);
ivisit.stop();
}
});
if (!isCheck.getObject()) {
parent.visitChildren(Check.class, (check, ivisit) -> {
if (check.getMarkupId().equalsIgnoreCase(lastFocussedElementId)) {
isCheck.setObject(Boolean.TRUE);
ivisit.stop();
}
});
}
if (!isCheck.getObject()) {
togglePanel.toggleWithContent(target, getActions(model), model.getObject());
}
}
}
});
}
}
return item;
}
示例12: newRowItem
import org.apache.wicket.markup.repeater.OddEvenItem; //导入依赖的package包/类
@Override
protected Item<T> newRowItem(final String id, final int index, final IModel<T> model) {
return new OddEvenItem<T>(id, index, model);
}