<commit_before>/**
 * 
 */
package org.orienteer.core.component.property;

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.html.panel.GenericPanel;
import org.apache.wicket.model.IModel;
import org.orienteer.core.web.schema.OPropertyPage;

import com.orientechnologies.orient.core.metadata.schema.OProperty;

/**
 * To making fields in classes by fields in documents 
 */
public class UnregistredPropertyEditPanel extends GenericPanel<OProperty> {

	public UnregistredPropertyEditPanel(String id, IModel<OProperty> model) {
		super(id, model);
		add(makeRealizeButton());
	}
	
	protected Component makeRealizeButton() {
		return new AjaxLink("realize") {
			@Override
			public void onClick(AjaxRequestTarget target) {
				setResponsePage(new OPropertyPage(UnregistredPropertyEditPanel.this.getModel()).setModeObject(DisplayMode.EDIT));
			}
		};
	}
	
	public void setPropertyComponent(Component propertyComponent){
		addOrReplace(propertyComponent);
	}
	
	public String getPropertyComponentId() {
		return "propertyComponent";
	}
	
}<commit_msg>Fix issue with absence of markup: related to #454<commit_after>/**
 * 
 */
package org.orienteer.core.component.property;

import org.apache.wicket.Component;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.markup.html.AjaxLink;
import org.apache.wicket.markup.IMarkupFragment;
import org.apache.wicket.markup.html.panel.GenericPanel;
import org.apache.wicket.model.IModel;
import org.orienteer.core.service.IMarkupProvider;
import org.orienteer.core.web.schema.OPropertyPage;

import com.google.inject.Inject;
import com.orientechnologies.orient.core.metadata.schema.OProperty;

/**
 * To making fields in classes by fields in documents 
 */
public class UnregistredPropertyEditPanel extends GenericPanel<OProperty> {
	
	@Inject
	private IMarkupProvider markupProvider;

	public UnregistredPropertyEditPanel(String id, IModel<OProperty> model) {
		super(id, model);
		add(makeRealizeButton());
	}
	
	protected Component makeRealizeButton() {
		return new AjaxLink("realize") {
			@Override
			public void onClick(AjaxRequestTarget target) {
				setResponsePage(new OPropertyPage(UnregistredPropertyEditPanel.this.getModel()).setModeObject(DisplayMode.EDIT));
			}
		};
	}
	
	@Override
	public IMarkupFragment getMarkup(Component child) {
		if(child!=null && child.getId().equals(getPropertyComponentId())) {
			return markupProvider.provideMarkup(child);
		} else {
			return super.getMarkup(child);
		}
	}
	
	public void setPropertyComponent(Component propertyComponent){
		addOrReplace(propertyComponent);
	}
	
	public String getPropertyComponentId() {
		return "propertyComponent";
	}
	
}
{'fraction_non_alphanumeric': 0.1064516129032258, 'fraction_numerical': 0.001075268817204301, 'mean_word_length': 5.551643192488263, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4338106', 'n_tokens_mistral': 912, 'n_tokens_neox': 840, 'n_words': 154}