render: function() {
$('.buttontoolbarview-tab', this.element).unbind('click.buttontoolbarview');
$('.buttontoolbarview-button', this.element).unbind('click.buttontoolbarview');
render: function() {
$('.buttontoolbarview-tab', this.element).unbind('click.buttontoolbarview');
$('.buttontoolbarview-button', this.element).unbind('click.buttontoolbarview');
this.element.html(render_template(this.template, this));
$('.buttontoolbarview-tab', this.element).bind('click.buttontoolbarview', function() {
var groupIndex = $(this).attr('ui:groupindex');
this.element.html(render_template(this.template, this));
$('.buttontoolbarview-tab', this.element).bind('click.buttontoolbarview', function() {
var groupIndex = $(this).attr('ui:groupindex');
var groupIndex = parseInt($(this).attr('ui:groupindex'), 10);
var buttonIndex = parseInt($(this).attr('ui:buttonindex'), 10);
var button = self.get('buttons')[groupIndex].buttons[buttonIndex];
var scriptletId = button.scriptlet_id;
var params = eval('(' + button.params + ')'); // To nie powinno być potrzebne
console.log('Executing', scriptletId, 'with params', params);
var groupIndex = parseInt($(this).attr('ui:groupindex'), 10);
var buttonIndex = parseInt($(this).attr('ui:buttonindex'), 10);
var button = self.get('buttons')[groupIndex].buttons[buttonIndex];
var scriptletId = button.scriptlet_id;
var params = eval('(' + button.params + ')'); // To nie powinno być potrzebne
console.log('Executing', scriptletId, 'with params', params);