Factory method for creating a new {@link Loop} for the tabs.

@param id
the id
@param model
the model
@return the new {@link Loop} for the tabs.
509010
protected Loop newTabsLoop(final String id, final IModel<Integer> model)
	{
		final Loop localTabsLoop = new Loop(id, model)
		{
			/** The Constant serialVersionUID. */
			private static final long serialVersionUID = 1L;

			/**
			 * {@inheritDoc}
			 */
			@Override
			protected LoopItem newItem(final int iteration)
			{
				return newTabContainer(iteration);
			}

			/**
			 * {@inheritDoc}
			 */
			@Override
			protected void populateItem(final LoopItem item)
			{
				final int index = item.getIndex();
				final T tab = AjaxAddableTabbedPanel.this.tabs.get(index);

				final WebMarkupContainer titleCloseLink = newCloseLink("closeTab", index);

				titleCloseLink.add(newCloseTitle("closeTitle", tab.getCloseTitle(), index));
				item.add(titleCloseLink);

				final WebMarkupContainer titleLink = newLink("link", index);

				titleLink.add(newTitle("title", tab.getTitle(), index));
				item.add(titleLink);
				item.add(new AttributeAppender("class", " label"));

			}
		};
		localTabsLoop.setOutputMarkupId(true);
		return localTabsLoop;
	}
38212
protected LabeledTextAreaPanel<String, DeregistrationModelBean> newMotivation(final String id,
		final IModel<DeregistrationModelBean> model)
	{
		final IModel<String> labelModel = ResourceModelFactory.newResourceModel(
			ResourceBundleKey.builder().key("sem.main.feedback.deregistration.user.label")
				.defaultValue("Please confirm the deregistration")
				.parameters(ListExtensions.toObjectArray(getDomainName())).build(),
			this);
		final IModel<String> placeholderModel = ResourceModelFactory.newResourceModel(
			"global.enter.your.deregistration.motivation.label", this,
			"Enter here your deregistration motivation.");
		final LabeledTextAreaPanel<String, DeregistrationModelBean> description = new LabeledTextAreaPanel<String, DeregistrationModelBean>(
			id, model, labelModel)
		{
			/** The Constant serialVersionUID. */
			private static final long serialVersionUID = 1L;

			/**
			 * {@inheritDoc}
			 */
			@Override
			protected TextArea<String> newTextArea(final String id,
				final IModel<DeregistrationModelBean> model)
			{
				final TextArea<String> textArea = super.newTextArea(id, model);
				if (placeholderModel != null)
				{
					textArea.add(new AttributeAppender("placeholder", placeholderModel));
				}
				return textArea;
			}
		};
		return description;
	}
98342
@Override
    public T findById(ID id)
            throws NoSuchItemException, JeppettoException {
        QueryModel queryModel = new QueryModel();

        queryModel.addCondition(buildCondition("id", ConditionType.Equal, Collections.singletonList(id).iterator()));

        return findUniqueUsingQueryModel(queryModel);
    }
784432
private static TableColumnModelListener createTableColumnModelListener(final JTable table) {
        return new TableColumnModelListener() {
            public void columnAdded(TableColumnModelEvent e) {
                if (table.getParent() instanceof JViewport && table.getParent().getParent() instanceof JScrollPane) {
                    table.getParent().repaint();
                }
            }

            public void columnMarginChanged(ChangeEvent e) {
                if (table.getParent() instanceof JViewport && table.getParent().getParent() instanceof JScrollPane) {
                    table.getParent().repaint();
                }
            }

            public void columnMoved(TableColumnModelEvent e) {
                if (table.getParent() instanceof JViewport && table.getParent().getParent() instanceof JScrollPane) {
                    table.getParent().repaint();
                }
            }

            public void columnRemoved(TableColumnModelEvent e) {
                if (table.getParent() instanceof JViewport && table.getParent().getParent() instanceof JScrollPane) {
                    table.getParent().repaint();
                }
            }

            public void columnSelectionChanged(ListSelectionEvent e) {
                if (table.getParent() instanceof JViewport && table.getParent().getParent() instanceof JScrollPane) {
                    table.getParent().repaint();
                }
            }
        };
    }
426249
protected Button newButton(final String id)
	{
		return new Button(id)
		{
			/** The serialVersionUID. */
			private static final long serialVersionUID = 1L;

			@Override
			public void onSubmit()
			{
				onSignup(ComponentFinder.findOrCreateNewAjaxRequestTarget(), getForm());
			}
		};
	}
849618
public static <T> DropDownChoice<T> newDropDownChoice(final String id, final IModel<T> model,
		final List<? extends T> choices)
	{
		final DropDownChoice<T> dropDownChoice = new DropDownChoice<>(id, model, choices);
		dropDownChoice.setOutputMarkupId(true);
		return dropDownChoice;
	}
622055
public static <L extends Serializable, R extends Serializable> TwoFormComponentPanel<L, R> newTwoFormComponentPanel(
		final String id, final IModel<TwoFormComponentBean<L, R>> model)
	{
		final TwoFormComponentPanel<L, R> twoFormComponentPanel = new TwoFormComponentPanel<>(id,
			model);
		return twoFormComponentPanel;
	}
1349068
public static <T extends Enum<T>> EnumLabel<T> newEnumLabel(final String id,
		final IModel<T> model)
	{
		final EnumLabel<T> enumLabel = new EnumLabel<T>(id, model)
		{
			/** The serialVersionUID. */
			private static final long serialVersionUID = 1L;

			/**
			 * {@inheritDoc}
			 */
			@Override
			protected String resourceKey(final T value)
			{
				return value.name();
			}
		};
		enumLabel.setOutputMarkupId(true);
		return enumLabel;
	}
779593
@RequestMapping(value = "/api/plugins/{id}", method = RequestMethod.DELETE)
    public
    @ResponseBody
    HashMap<String, Object> deletePluginPath(Model model, @PathVariable Integer id) {
        try {
            PluginManager.getInstance().deletePluginPath(id);
        } catch (Exception e) {
        }

        return pluginInformation();
    }
5466
function(model) {
      var t = this,
          componentView = new ComponentView({model: model});
      componentView.$el
        .addClass('nm-pv-component')
        .data('view', componentView);
      componentView.render();
      t.canvas.append(componentView.$el);
      t.componentViews[model.get('id')] = componentView;
    }
531958
public KieSessionModel newKieSessionModel(String name) {
        KieSessionModel kieSessionModel = new KieSessionModelImpl( this, name );
        Map<String, KieSessionModel> newMap = new HashMap<String, KieSessionModel>();
        newMap.putAll( this.kSessions );
        newMap.put( kieSessionModel.getName(), kieSessionModel );
        setKSessions( newMap );

        return kieSessionModel;
    }
569010
@SuppressWarnings("unchecked")
  public static <T extends ModelElementInstance> Collection<T> getModelElementCollection(Collection<DomElement> view, ModelInstanceImpl model) {
    List<ModelElementInstance> resultList = new ArrayList<ModelElementInstance>();
    for (DomElement element : view) {
      resultList.add(getModelElement(element, model));
    }
    return (Collection<T>) resultList;
  }
1248835
protected Label newActionLinkLabel(final String id, final IModel<String> model)
	{
		final Label label = ComponentFactory.newLabel(id, model);
		return label;
	}
201275
public static ShareableResource get(Model mo, String id) {
    return (ShareableResource) mo.getView(VIEW_ID_BASE + id);
  }
215791
public static <T> String edit(Model model, Integer id,
			Function<Integer, T> find, Supplier<T> create, String attrName,
			String editView) {
		if (id == null)
			return "";

		T obj = null;
		if (id == 0)
			obj = create.get();
		else
			obj = find.apply(id);

		if (obj == null)
			return "notfound";

		model.addAttribute(attrName, obj);
		return editView;
	}
239935
public T byId(Object id) {
        this.beforeCheck();
        this.where(primaryKeyColumn, id);

        String sql = this.buildSelectSQL(false);

        T model = this.queryOne(modelClass, sql, paramValues);

        ifNotNullThen(model, () -> this.setJoin(Collections.singletonList(model)));

        return model;
    }
154530
public static DBIDPair newPair(DBIDRef id1, DBIDRef id2) {
    return DBIDFactory.FACTORY.newPair(id1, id2);
  }