Ui Table Widget- 7.0.1

1
0
-1

Hi,

I am populating List<List> from my connector, and storing it to the List type ProcessVariable, is there any extra stuff I need to do to get the values listed in to a table widget.

As of now, I am able to get the whole list of data in one single column, I have no BDM, assistance is much appreciated...

Thanks,

2 answers

1
+1
-1

You need to change the list into json format...

see here

http://community.bonitasoft.com/answer-postgres-query-result-list-lists-fills-only-first-column-form-table#comment-5333

regards
Seán

PS: If this reply answers your question, please mark a resolved.

Comments

Submitted by vivek.paranthaman on Thu, 01/07/2016 - 14:03

However, if I want to access an ajax with the form, where I submit the values to be searched and it fetched the values in one single form, how to achieve that.(Not satisfied with the flow from process to process)

Thanks,

Submitted by Sean McP on Fri, 01/08/2016 - 08:16

Create a variable in the form of type Javascript Expression called message01

The value is

return jsGetMessage("myMessage");

Add a text field to the form and in the text box enter {{ message01 }}

Create a javascript file called jsGetMessage.js and add the following code:

function jsGetMessage(message) {

        var module = "jsGetMessage ";
        var debug = true;

        if (debug == true) {
                console.log(module + "v01.00");
        }
        if (debug == true) {
                console.log(module + "Arriving");
        }

        var xmlhttp;
        var gubeReturn = "No Message Found! Dingbats!";

        if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
                xmlhttp = new XMLHttpRequest();
        } else { // code for IE6, IE5
                xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }
        var jsRequest;
        jsRequest = "http://<<yourserver>><<:yourport>>/<<yourwebservice>>/<<yourpage>>?getmessage=" + message;

        if (debug == true) {console.log(module + "jsRequest: " + jsRequest)};
        xmlhttp.open("GET", jsRequest, false);
        xmlhttp.send();
        jsReturn = xmlhttp.responseText;
        if (debug == true) {console.log(module + "jsReturn SUCCESS: " + jsReturn)};
       
        if (debug == true) {
                console.log(module + "Leaving");
        }

        return jsReturn;
}

UPDATED:
Add an Asset to the Form, select Local and point to the file you created...this will then work.

I will leave you to write your ajax as you seem to know what to do there, and execute in preview mode. It works!

regards
Seán

Submitted by vivek.paranthaman on Fri, 01/08/2016 - 06:23

Hi Seán,

This explains pretty much, however.. the form doesn't allow to make changes in the available widgets, so as to apply on-click / ng-submit from a button..
How is this external file accessed to a form/widget. It takes a risk lot of time to figure it out.. This part with the bonita...
jsRequest = "http://localhost:2125//
?getmessage=" + message;
Thanks

Submitted by Sean McP on Fri, 01/08/2016 - 08:19

Third time of writing this...

One question please...if you can write down your whole requirement in one much easier...

Q1 data to table, done
then Q2 data from ajax, done
now Q3 change data? Sorry I don't have time

I've updated the previous post to say how to add the js to the form and fixed the bit about jsRequest talking to your webservice.

regards
Seán

1
0
-1

Hi Sean,

Thank you,
I have solved it in different manner, I have used the HashMap to get my values, and access it with the key.. Thank you for your effort.

Notifications