Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Wiki Markup |
---|
Hi, I am writing my own plugin and I want to have a grid on property page. I want to specify a select box as grid column and also want to populate its data using a ajax url. If I specify my own options hard codded then it is working but when I specify options_ajax then it renders a text box This is what I am trying to achieve { name : 'options', label : '@@datalist.formrowcascadedeletedatalistaction.columns@@', description : '@@datalist.formrowcascadedeletedatalistaction.columns.desc@@', type : 'grid', columns : \[{ name : 'childTable', label : '@@datalist.formrowcascadedeletedatalistaction.childtable@@', type : 'elementselect', options_ajax : '\[CONTEXT_PATH\]/web/property/json/getElements?classname=org.joget.apps.form.model.FormLoadMultiRowElementBinder', url : '\[CONTEXT_PATH\]/web/property/json\[APP_PATH\]/getPropertyOptions' },{ name : 'foreignKeyColumn', label : '@@datalist.formrowcascadedeletedatalistaction.foreignkey@@', type : 'elementselect', options_ajax : '\[CONTEXT_PATH\]/web/property/json/getElements?classname=org.joget.apps.form.model.FormLoadMultiRowElementBinder', url : '\[CONTEXT_PATH\]/web/property/json\[APP_PATH\]/getPropertyOptions' }\] { name : 'options', label : '@@datalist.columns@@', description : '@@datalist.columns.desc@@', type : 'grid', columns : \[{ name : 'value', label : '@@datalist.value@@', type : 'elementselect', options_ajax : '\[CONTEXT_PATH\]/web/property/json/getElements?classname=org.joget.apps.form.model.FormLoadMultiRowElementBinder', url : '\[CONTEXT_PATH\]/web/property/json\[APP_PATH\]/getPropertyOptions' },{ name : 'label', label : '@@datalist.label@@', type : 'elementselect', options_ajax : '\[CONTEXT_PATH\]/web/property/json/getElements?classname=org.joget.apps.form.model.FormLoadMultiRowElementBinder', url : '\[CONTEXT_PATH\]/web/property/json\[APP_PATH\]/getPropertyOptions' }\] But this renders a textbox instead of select box But when I try { name : 'options', label : '@@datalist.columns@@', description : '@@datalist.columns.desc@@', type : 'grid', columns : \[{ key : 'label', label : '@@datalist..value@@value', options : \[{ value value : 'text', label : '@@form.formgrid.formatType.text@@' }, { label' }, { value : 'html', label : '@@form.formgrid.formatType.html@@' }, { value : 'decimal', label : '@@form.formgrid.formatType.decimal@@' }, { value : 'date', label : '@@form.formgrid.formatType.date@@' }, { value : 'file', label : '@@form.formgrid.formatType.file@@' }, { value : 'image', label : '@@form.formgrid.formatType.image@@' }\] html' } \] } Then this renders a select box. Please suggest how can I render a select box as a grid column which populates its value from a ajax url. Thanks, promod |