我想知道是否有人可以帮助我获取使用 metawidget jsonSchema 显示的按钮、函数调用和表。
不幸的是,我可以将它视为我们应用程序的表单渲染器,它是我们需要在外部定义的吗?如果我们能以某种方式从一种形式导航到另一种形式
<script type="text/javascript">
var mw = new metawidget.Metawidget( document.getElementById( 'metawidget' ), {
inspector: new metawidget.inspector.CompositeInspector( [ new metawidget.inspector.PropertyTypeInspector(),
function( toInspect, type, names ) {
return {
properties:
name: {
required: true
},
notes: {
type: "string",
large: true
},
employer: {
type: "string",
section: "Work"
},
department: {
type: "string"
}
}
};
} ] ),
layout: new metawidget.jqueryui.layout.TabLayoutDecorator(
new metawidget.layout.TableLayout( { numberOfColumns: 2 } ))
} );
mw.toInspect = person;
mw.buildWidgets();
上面的模式只包含渲染字段的属性,但是在哪里指定功能呢?