protected Component newContentComponent(String componentId, IModel<T> model) { return new Folder<T>(componentId, getTree(), model) { @Override protected IModel<?> newLabelModel(IModel<T> model) { return $m.map(model, contentLabelFunction); } }; } }
public BSActionPanel<T> appendAction(ActionConfig<T> actionConfig, IBiFunction<String, IModel<T>, MarkupContainer> linkFactory) { return appendAction(actionConfig.linkFactory(linkFactory)); }
@Override protected Component createContent(String id, IModel<T> model) { return BSTreeColumn.this.newContentComponent(id, model); } };
public BSActionPanel<T> appendAction(IModel<?> labelModel, IModel<Icon> iconeModel, IBiFunction<String, IModel<T>, MarkupContainer> linkFactory) { return appendAction(new ActionConfig<T>().labelModel(labelModel).iconeModel(iconeModel) .stripeModel(null) .linkFactory(linkFactory) .styleClasses($m.ofValue("black")).withText(true)); }
public final BSActionColumn<T, S> appendAction(IModel<?> labelModel, IBSAction<T> action) { return appendAction(labelModel, (IModel<Icone>) null, action); }
protected void onPopulateActions(IModel<T> rowModel, BSActionPanel<T> actionPanel) { for (ActionItem<T> item : actions) { if (item.actionConfig.showActionItemFor(rowModel)) { actionPanel.appendAction(item.actionConfig, item.action); } } factories.forEach(factory -> actionPanel.appendComponent(factory, rowModel)); }
public ActionConfig<T> iconeModel(IModel<Icone> iconeModel, IModel<String> iconeStyle) { return iconeModel(iconeModel, iconeStyle, null); }
private String getBadgeCssClassAttribute(IModel<Object> cellModel, IModel<T> rowModel) { String css = "class=\"label label-sm "; BagdeType type = BagdeType.NONE; if (badgeTypeMapper != null) { type = badgeTypeMapper.getType(cellModel, rowModel); } if (type == BagdeType.NONE) { return css + " \" style=\"background-color: #889988;\" "; } else { return css + " label-" + type.name().toLowerCase() + "\""; } }
@Override public String getCssClass() { return " action-column " + super.getCssClass(); }
public BSActionPanel(String id, IModel<T> rowModel) { super(id, rowModel); add(actions, otherActions); }
@SuppressWarnings("unchecked") public IModel<T> getModel() { return (IModel<T>) getDefaultModel(); }
@SuppressWarnings("unchecked") public T getModelObject() { return (T) getDefaultModelObject(); }
public BSActionPanel<T> appendAction(IModel<?> labelModel, IModel<Icone> iconeModel, IBiFunction<String, IModel<T>, MarkupContainer> linkFactory) { return appendAction(new ActionConfig<T>().labelModel(labelModel).iconeModel(iconeModel) .stripeModel(null) .linkFactory(linkFactory) .styleClasses($m.ofValue("black")).withText(true)); }
protected void onPopulateActions(IModel<T> rowModel, BSActionPanel<T> actionPanel) { for (ActionItem<T> item : actions) { if (item.actionConfig.showActionItemFor(rowModel)) { actionPanel.appendAction(item.actionConfig, item.action); } } factories.forEach(factory -> actionPanel.appendComponent(factory, rowModel)); }
public BSActionPanel<T> appendAction(ActionConfig<T> actionConfig, IBiFunction<String, IModel<T>, MarkupContainer> linkFactory) { return appendAction(actionConfig.linkFactory(linkFactory)); }
private String getBadgeCssClassAttribute(IModel<Object> cellModel, IModel<T> rowModel) { String css = "class=\"label label-sm "; BagdeType type = BagdeType.NONE; if (badgeTypeMapper != null) { type = badgeTypeMapper.getType(cellModel, rowModel); } if (type == BagdeType.NONE) { return css + " \" style=\"background-color: #889988;\" "; } else { return css + " label-" + type.name().toLowerCase() + "\""; } }
protected Component newNodeComponent(String componentId, IModel<T> model) { return new Node<T>(componentId, getTree(), model) { @Override protected Component createContent(String id, IModel<T> model) { return BSTreeColumn.this.newContentComponent(id, model); } }; }
@Override protected Component createContent(String id, IModel<T> model) { return BSTreeColumn.this.newContentComponent(id, model); } };
protected Component newNodeComponent(String componentId, IModel<T> model) { return new Node<T>(componentId, getTree(), model) { @Override protected Component createContent(String id, IModel<T> model) { return BSTreeColumn.this.newContentComponent(id, model); } }; }
protected Component newContentComponent(String componentId, IModel<T> model) { return new Folder<T>(componentId, getTree(), model) { @Override protected IModel<?> newLabelModel(IModel<T> model) { return $m.map(model, contentLabelFunction); } }; } }