Source:
public ODocumentNonRegisteredPropertiesWidget(String id, final IModel<ODocument> model, IModel<ODocument> widgetDocumentModel) { super(id, model, widgetDocumentModel); final Form<ODocument> form = new TransactionlessForm("form", getModel()); final IModel<List<OProperty>> propertiesModel = new LoadableDetachableModel<List<OProperty>>() { @Override protected List<OProperty> load() { ODocument doc = model.getObject(); Set<String> fieldNames = new HashSet<String>(Arrays.asList(doc.fieldNames())); Set<String> propertiesNames = doc.getSchemaClass().propertiesMap().keySet(); fieldNames.removeAll(propertiesNames); List<OProperty> ret = new ArrayList<OProperty>(fieldNames.size()); for (String field : fieldNames) { ret.add(oClassIntrospector.virtualizeField(doc, field)); } Collections.sort(ret); return ret; } }; propertiesStructureTable = new OrienteerStructureTable<ODocument, OProperty>("properties", getModel(), propertiesModel){ @Override protected Component getValueComponent(String id, IModel<OProperty> rowModel) { return new ODocumentMetaPanel<Object>(id, getModeModel(), ODocumentNonRegisteredPropertiesWidget.this.getModel(), rowModel){ @Override protected Component resolveComponent(String id, DisplayMode mode, OProperty property) { if (DisplayMode.EDIT.equals(getModeObject())){ UnregistredPropertyEditPanel<?> result = new UnregistredPropertyEditPanel<OProperty>(id,getPropertyModel()); result.setPropertyComponent(super.resolveComponent(result.getPropertyComponentId(), mode, property)); result.setReloadableModel(propertiesModel); return result; }else{ return super.resolveComponent(id, mode, property); } } }; } }; form.add(propertiesStructureTable); add(form); }

Target:
public ODocumentNonRegisteredPropertiesWidget(String id, final IModel<ODocument> model, IModel<ODocument> widgetDocumentModel) { super(id, model, widgetDocumentModel); Form<ODocument> form = new Form<ODocument>("form", getModel()); IModel<List<OProperty>> propertiesModel = new LoadableDetachableModel<List<OProperty>>() { @Override protected List<OProperty> load() { ODocument doc = model.getObject(); Set<String> fieldNames = new HashSet<String>(Arrays.asList(doc.fieldNames())); Set<String> propertiesNames = doc.getSchemaClass().propertiesMap().keySet(); fieldNames.removeAll(propertiesNames); List<OProperty> ret = new ArrayList<OProperty>(fieldNames.size()); for (String field : fieldNames) { ret.add(oClassIntrospector.virtualizeField(doc, field)); } Collections.sort(ret); return ret; } }; propertiesStructureTable = new OrienteerStructureTable<ODocument, OProperty>("properties", getModel(), propertiesModel){ @Override protected Component getValueComponent(String id, IModel<OProperty> rowModel) { return new ODocumentMetaPanel<Object>(id, getModeModel(), ODocumentNonRegisteredPropertiesWidget.this.getModel(), rowModel){ @Override protected Component resolveComponent(String id, DisplayMode mode, OProperty property) { if (DisplayMode.EDIT.equals(getModeObject())){ UnregistredPropertyEditPanel result = new UnregistredPropertyEditPanel(id,getPropertyModel()); result.setPropertyComponent(super.resolveComponent(result.getPropertyComponentId(), mode, property)); return result; }else{ return super.resolveComponent(id, mode, property); } } }; } }; form.add(propertiesStructureTable); add(form); }