Hello. I am trying to create app for creating and modifying business vars (something like simple registry) and i have problem with modifying data in inputs.
I have 2 processes - first for creating, second for modifying business vars.
The problem is in second one:
So here i have list of all existing entries:
, when i press second button i take persistanceId of the record and pass it to my second (record edit) page.
In this second page i take record entry by its persistance id, fill inputForm JSON variable with it and bind my form inputs with it data.
Javascript for filling JSON inputForm variable:
$data.formInput.newName = $data.country[0].name
$data.formInput.newAlpha = $data.country[0].alpha2Code
$data.formInput.contryId = $data.countryId
return "hello";
And my idea is to call instantiation of edit process, and modify business variable with inputed data. The problem is - i cant modify my inputs.
I’ve tried everything - but if i bind my inputs with JSON variable with existing business variable data - i just cand type there anything. Nothing helps -
So the main question is - what can i do to fix it.
The second question is (it is not referenced to main problem) - can i somehow add custom event listeners for page elements (for example - perform some action just before onclick event for submit button) and if i cant - how to do it?
UPD:
I tried to create instantiation form for edit process via bonita bpm studio (in Execution tab of my process pool) and faced pretty much the same problem:
I get record by its persistance id by external api variable:
`../API/bdm/businessData/com.company.model.Country?q=findByPersistenceId&p=0&c=10&f=persistenceId={{countryId}}`
then set formInput values with it:
$data.formInput.newName = $data.country[0].name
$data.formInput.newAlpha = $data.country[0].alpha2Code
$data.formInput.contryId = $data.countryId
return "hello";
and after that i cant type anything in my form inputs. Still have no idea why and how to overcome this problem