Hi Team,
How to set Value to the input field in Property panel.
Thanks
-Prameela
Hi Team,
How to set Value to the input field in Property panel.
Thanks
-Prameela
Hi @prameela
In the properties panel when adding a group entry you can specify a set and get function. The set function takes the following parameters element, values, containerElement, what you can do is use the cmd helper to update the business object. So something like the following:
var is = require(âbpmn-js/lib/util/ModelUtilâ).is,
entryFactory = require(âbpmn-js-properties-panel/lib/factory/EntryFactoryâ),
domQuery = require(âmin-dom/lib/queryâ),
getBusinessObject = require(âbpmn-js/lib/util/ModelUtilâ).getBusinessObject,
eventDefinitionHelper = require(âbpmn-js-properties-panel/lib/helper/EventDefinitionHelperâ),
elementHelper = require(âbpmn-js-properties-panel/lib/helper/ElementHelperâ),
extensionElementsHelper = require(âbpmn-js-properties-panel/lib/helper/ExtensionElementsHelperâ),
cmdHelper = require(âbpmn-js-properties-panel/lib/helper/CmdHelperâ),
forEach = require(âlodash/collection/forEachâ);module.exports = function(group, element, bpmnFactory) {
var bo = getBusinessObject(element);group.entries.push({
âidâ: âmytextinputâ,
âlabelâ: âtext inputâ,
âdescriptionâ: ââ,
âhtmlâ: ââ,set: function(element, values, containerElement) { var cmd; cmd = cmdHelper.updateBusinessObject(element, {}, {}) return cmd; }, get: function(element) {}
})
}
Just to add there are quite a few ways to update a property, so I would look at the properties panel provider parts. e.g https://github.com/bpmn-io/bpmn-js-properties-panel/blob/master/lib/provider/bpmn/parts/ProcessProps.js
Hey @prameela,
can you please be more precise, what you mean by âsetting value to the input fieldâ?
Thanks
Hi Dalestone,
Thanks for reply.Whatever the way you said correct but my requirement is different. In-detail explained below
@pedesen
Thanks for reply.Please find In-detail explanation for the above issue.
I have one input field like this,
var entityTypeEntry = entryFactory.textField({
id: 'entityType',
description: '',
label: 'Entity Type',
modelProperty: 'entityType',
});
group.entries.push(entityTypeEntry);
and populating data to the input field manually based on âIdâ and triggering the change event
$("#camunda-entityType").val(displayName).change();
Predefind event given by bpmn.io ,In Property Panel to trigger event when data entered(Keyboard events) into the input field is
domDelegate.bind(container, â[data-entry]â, âchangeâ, handleChange);
How can i trigger above event when data populated into input field manually through .val() method.Please help me to resolve this issue.
Thanks
-Prameela
Fire event with bubbles=true. Look at TestHelper.js
Hi Team,
Still this issue exists for me.Could anybody suggest me popup functionality in property-panel
Thanks
-Prameela
Any update on this M also facing the same issue