Skip to Content
1
Former Member
Nov 27, 2014 at 01:53 PM

DS 1.4 SDK: binding events to DS script

27 Views

Hi everyone,

I'm trying to implement the new ZTL concepts described by @Reiner Hille-Doering in the last 2 sections of What's Coming in Design Studio 1.4 SDK

For first section (named: Binding Events to Design Studio Script Methods), I wasn't able to use the @Visibility(private) directive.

My code in contribution.xml:

<property
  id="onFilterApplied"
  title="Filter Applied"
  type="ScriptText"
  group="Events"
  visible="false"/>
<initialization>
  <defaultValue property="onFilterApplied">this.applyFilter();</defaultValue>
</initialization>

In contribution.ztl:

@Visibility(private)
  void applyFilter(){*
    //...
  *}

Ends up with the error:

Couldn't resolve reference to Member 'applyFilter'.
 in script 
BREADCRUMBFILTER_2.applyFilter();

Removing @Visibility(private) works fine though!

For second section (Pseudo Event "beforeRender"), I have used the following in contribution.xml:

<defaultValue property="beforeRender">this.onBeforeRender();</defaultValue>

In ZTL:

void onBeforeRender(){*
  APPLICATION.createErrorMessage('before render');
*}

But this seems not to be called at all, with or without @Visibility(private)... It's as if the pseudo-event didn't exist or wasn't triggered.

Any idea on what could be happening?

I couldn't find any information about these new concepts in the developer guide for Design Studio 1.4. Have I missed anything?

Many thanks in advance,

Tanguy