Child pages
  • Specification (.spec file)

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Basically the stuff our content spec describes for element types.

 

Event handlers are pushed via handlers, for exanmple databutton.html:

Code Block
<input style="width:100%; height:100%; background-color:{{model.background}};" value="{{model.dataProviderID}}" type="button" title="{{model.toolTipText}}"  ng-click="handlers.onActionMethodID($event)" />

 

The handler will return a promise object which can be used to get the value returned by the method on the server:

Code Block
      controller: function($scope, $element, $attrs) {
          $scope.callMyHandler = function(ev) {
              var promise = this.handlers.onMyEvent(ev)
              promise.then(function(ret) {
                  alert('Success: ' + ret);
                }, function(reason) {
                  alert('Failed: ' + reason);
                }, function(update) {
                  alert('Got notification: ' + update);
                });
          }
      }

 

For the prototype we could even generate these for all default "servoy" components, like datafield, databutton,etc.