/**
 * 
 */
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";
	}
	
}

@@ -190,16 +190,65 @@
 axLink;%0A
+import org.apache.wicket.markup.IMarkupFragment;%0A
 import o
@@ -331,24 +331,75 @@
 del.IModel;%0A
+import org.orienteer.core.service.IMarkupProvider;%0A
 import org.o
@@ -439,16 +439,49 @@
 yPage;%0A%0A
+import com.google.inject.Inject;%0A
 import c
@@ -679,16 +679,68 @@
 perty%3E %7B
+%0A%09%0A%09@Inject%0A%09private IMarkupProvider markupProvider;
 %0A%0A%09publi
@@ -1132,24 +1132,259 @@
 %7D%0A%09%09%7D;%0A%09%7D%0A%09%0A
+%09@Override%0A%09public IMarkupFragment getMarkup(Component child) %7B%0A%09%09if(child!=null && child.getId().equals(getPropertyComponentId())) %7B%0A%09%09%09return markupProvider.provideMarkup(child);%0A%09%09%7D else %7B%0A%09%09%09return super.getMarkup(child);%0A%09%09%7D%0A%09%7D%0A%09%0A
 %09public void

Fix issue with absence of markup: related to #454