Hello commrades! I have an issue with binding action on a simple button in Bonita BPM Studio (also there is another issue with hidden fields).
All actions are performed with BonitaForm.html file in C:%path_to_Bonita%\workspace\tomcat\bonita\client\platform\tenant-template\work\theme\portal and of course in the program.
In Studio I have added Html widget, Hidden Field, Simple Button to the form with submit button. I’m trying to access the process variables through the JavaScript. But unfortunately, even a simple bind action on button does not work. I added a new class name to Simple Button “createSpec” at *Form Builder → Appearance → Field *for easy accessing to element. Since jQuery is already connected in the file BonitaForm.html, I put the jQuery code into the Html Widget (for some reason code refused to work when it is in file and connected in of BonitaForm.html). So here are the code:
$(document).ready(function () { $('.createSpec').find(':last').click(function () { alert("RUNNING"); }); })The following jQuery code [ http://jsfiddle.net/27Rf5/ ] is not working in Bonita when I running the process, but it works in simple .html file that I created and, as you see, in jsfiddle site.
What I’ve tried to:
-
Put the jquery code into simple Button options, but it’s not working
-
Change jQuery code to
And this works, but it binds the area line in browser instead of button.
What should I change?
And another question: To access the process variables through javaScript I should use Hidden field with binded String process variable to it. In javascript code I should access the Hidden field value by ID and then send to it value fro JS variable. But what should I do if I have a list of values that can dynamically change? In this case I can’t add Hidden Fileds, because I simply don’t know how much I will require them.
I am using Bonita BPM Studio Community 6.2.5, Java 7u51, Windows 7 x64
Regards,
Igor