-
FEATURED COMPONENTS
First time here? Check out the FAQ!
My application runs ok in Tomcat but the ZK Editor cannot find my classes and marks them as unresolved. I started this project as a Dynamic Web Project and I am creating my new class files in the default package in the Java Resources (src) folder. Something is screwed up with the way I've got the project configured but I'm stumped. This isn't the same problem as the build directory issue I posted about last week but I suspect it's related somehow. Any help would be appreciated.
Thanks,
Scott
Do you mean the class in default package(empty package) can't be referred in zul editor?
could try to make the class with a package(eg. com.my) to see it works or not.
and please post you zul file here to help us figure the problem.
Thanks for the help, Dennis. Moving the files out of the default package fixed the problem!
Here's a java class in the default package:
----------------
import org.zkoss.zul.Window;
public class TestWindow extends Window
{
public TestWindow(){}
}
------------------------
Here's a zuml file that uses TestWindow. In the Zul Editor, there is an error on line 3, "TestWindow cannot be resolved to a type". But it runs just fine, so Tomcat has no problem resolving TestWindow.
------------------------
<?page title="Title" contentType="text/html;charset=UTF-8"?>
<zk>
<window id="cwin" use="TestWindow" title="Test Title">
Hello!
</window>
</zk>
------------------------
If I move TestWindow into a non-default package it works, e.g:
----------------
package test;
import org.zkoss.zul.Window;
public class TestWindow extends Window
{
public TestWindow(){}
}
------------------------
------------------------
<?page title="Title" contentType="text/html;charset=UTF-8"?>
<zk>
<window id="cwin" use="test.TestWindow" title="Test Title">
Hello!
</window>
</zk>
------------------------
Now the Zul Editor stops complaining and can resolve test.TestWindow! Can anyone explain this?
a class without pacakge(namesapce) will cause many issues in java. this is common java issue.
I think you can search why by googleing.
Asked: 2009-02-18 22:58:56 +0800
Seen: 934 times
Last updated: Feb 20 '09
ZK studio and eclipse outline problem
ZK Package configuration problem
Eclipse Autocomplete not working in ZUL files...
Syntax Error mark ... help me!
Manual Installation of ZK Studio
Can't see button text whilst running simple demo
Adding Vbox to Center layout in Java