I would like to better understand data scoping in Brazos UI

132 views Asked by At

I would like to get an understanding of the data binding mechanism. It appears that within brazos there are 3 kinds of "binder" (for lack of a better term) - data, entity, and modalData. Would like to know how these hook up to data in the backend - let's say I have some new data to display on the screen how would I hook them up to the front end using these "binders". Thanks.

1

There are 1 answers

0
Greg Harley On BEST ANSWER

Brazos has 3 main data scopes within the UI.

Application Scope - which equates to the standard Angular controller scope used by the page. This is where service calls return the data to be bound by BrazosUI controls. It is the same scope that ng-init populates.

Data Scope - this is actually a sub scope of the Application scope and represents the set of data that MAY be sync'd with the process server (Activiti in your case). Any variables declared in the "data" scope, will automatically be pushed into the process instance as process variables (if the variable name existed in the process instance). This way, data that is pulled via the UI can be parsed automagically to the process instance for use in rules of process decisions.

ModalScope - This is a special scope used by Modal dailogues. It was put in place primarily to help with table updates where a selection of a row in a table could present a dialogue which had it's own scope.

Hope this helps, Greg