-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have thes 2 files trying to use genericforwardcomposer first time but gettin exception
composer3.zul
<window title="composer3 example" border="normal" width="300px" apply="MyComposer3">
<grid>
<rows>
<row>First Name: <textbox id="firstName" forward="onChange=onFirstName"/></row>
<row>Last Name: <textbox id="lastName" forward="onChange=onLastName"/></row>
<row>Full Name: <label id="fullName"/></row>
</rows>
</grid>
</window>
MyComposer3.java
public class MyComposer3 extends GenericAutowireComposer {
private Textbox firstName; //auto-wired
private Textbox lastName; //auto-wired
private Label fullName; //auto-wired
//all getFellow() codes are removed
public void onFirstName(Event event) {
fullName.setValue(firstName.getValue()+" "+lastName.getValue());
}
public void onLastName(Event event) {
fullName.setValue(firstName.getValue()+" "+lastName.getValue());
}
}
Getting this Exception
org.zkoss.zk.ui.UiException: java.lang.ClassNotFoundException: MyComposer3
public class MyComposer3 extends GenericAutowireComposer { private Textbox firstName; //auto-wired private Textbox lastName; //auto-wired private Label fullName; //auto-wired /** * default constructor.<br> */ public MyComposer3() { super(); } @Override public void doAfterCompose(Component window) throws Exception { super.doAfterCompose(window); // other stuff here } <window title="composer3 example" border="normal" width="300px" apply="fullPackagePathName.MyComposer3"> <grid> . . .
If you don't have a package statement at the top of your Java source, then you haven't compiled it and deployed it to WEB-INF/classes properly.
If you do have a package statement at the top of your Java source, change your apply attribute to include it.
...funny Stephan...we were both typing essentially the same thing at the same time!
Also, you haven't added a databinding annotation.
:-)
Also, you haven't added a databinding annotation.
Why does he need that?
Actually, in all of my zul files I have been using '@{}' at least once, so that's why I suggested. But, yes that's not needed if not using annotation.
Asked: 2011-03-19 02:50:06 +0800
Seen: 257 times
Last updated: Mar 20 '11