I am currently migrating our system from zk 3.6.4 to 5.0.8 and ran into a problem using the implicit componentScope object in a zul file. The following snippet of code illustrates the problem.
<toolbar > <toolbarbutton label="click me" onClick="alert(componentScope.get("key"))" > <custom-attributes key="SomeValue"/> </toolbarbutton> </toolbar>
Running the code produces the following error:
Sourced file: inline evaluation of: `` alert(componentScope.get("key"));'' : Error in method invocation: Method get( java.lang.String ) not found in class'org.zkoss.zk.ui.ext.Scopes$DeferredScope' : at Line: 2 : in file: inline evaluation of: `` alert(componentScope.get("key"));'' : componentScope .get ( "key" )
The work around to the problem is to use self.getAttribute() instead of componentScope.get().
This code worked great under zk 3.6.4.