-
FEATURED COMPONENTS
First time here? Check out the FAQ!
A modified Keystroke/Events example throws an exception when I hit enter in the textbox. I've tried both java and groovy versions. Neither work.
What could be causing this and how can I get more debug information to track down such errors?
Error Msg...
SEVERE: >>java.lang.NoClassDefFoundError: bsh/NameSpace
>>java.lang.ClassNotFoundException: bsh.NameSpace
>> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
Code....
<zk>
<grid fixedLayout="true" width="400px">
<rows>
<row>
Password
<textbox id="inp" onOK="doOk()" onCancel="doCancel()" ctrlKeys="^a#f2" onCtrlKey="doCtrlKey()" type="password" value="123456789" width="150px" />
</row>
</rows>
</grid>
<zscript language="Groovy">
import org.zkoss.zul.Messagebox
void doOk() {
Messagebox.show("ENTER key is pressed", "OK", Messagebox.OK, Messagebox.EXCLAMATION);
inp.focus();
}
</zscript>
</zk>
and you put the bsh.jar in your WEB-INF/lib?
I'm using maven with zkplus and zul dependencies...thought bsh.jar would be included? After adding the bsh (v1.3.0) dependency, the bsh.jar file is there and I get a different error...
Sourced file: inline evaluation of: `` doOk();'' : Attempt to resolve method: focus() on undefined variable or class name: inp : at Line: 15 : in file: inline evaluation of: `` import org.zkoss.zul.Messagebox; void doOk() { Messagebox.show("ENTER . . . '' : inp .focus ( )
If I change the zkscript langage to Groovy....
Sourced file: inline evaluation of: `` doOk();'' : Command not found: doOk() : at Line: 6 : in file: inline evaluation of: `` doOk();'' : doOk ( )
Code ...
<zk>
<grid fixedLayout="true" width="400px">
<rows>
<row>
Password
<textbox id="inp" onOK="doOk()" type="password" value="123456789" width="150px" />
</row>
</rows>
</grid>
<zscript language="Groovy">
def doOk = {
Messagebox.show("ENTER key is pressed", "OK", Messagebox.OK, Messagebox.EXCLAMATION)
inp.focus()
}
</zscript>
</zk>
I switched to bsh 2.0b4 and all appears to be working now. Would be nice to get the dependencies clear for beginners ;-)
<dependency>
<groupId>bsh</groupId>
<artifactId>bsh</artifactId>
<version>2.0b4</version>
</dependency>
Sure! Where exactly? and do I need another account? When I search for maven from zkoss.org home I get the following top three hits.
1. http://www.zkoss.org/smalltalks/foodtogo/zkfoodtogo.dsp
Dated...2007
2. http://docs.zkoss.org/wiki/ZK/How-Tos/Installation/How_to_Install_ZK_on_Maven
Should be removed/replaced...not much to do with ZK really
3. http://docs.zkoss.org/wiki/How-Tos/Installation/How_to_Add_Library_into_Maven_Repository_Manually
Dated 2008/2009 forum post
I'd like to put it somewhere to easily be found. Would be be great to have documentation by version. I've found it frustrating to sift through 3,4, and 5 year old information that may or may not be relevant to 5.x versions
Yes, you have to have another account for wiki.
We haven't have single sign-on for wiki and forum.
We should put maven related article together, at least we can add "See Also" link in the tail of each article.
You may write as you like, and modify afterward.
The accumulation of little good will can change the world.
Thank you.
Asked: 2010-06-16 12:36:27 +0800
Seen: 1,328 times
Last updated: Jun 17 '10