0

GenericForwardComposer Not Working.... need help please

asked 2011-03-19 02:50:06 +0800

Vikrant gravatar image Vikrant
69

updated 2011-03-19 02:51:15 +0800

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

delete flag offensive retag edit

7 Replies

Sort by ยป oldest newest

answered 2011-03-19 08:13:23 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2011-03-19 08:14:37 +0800

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>
. . .

link publish delete flag offensive edit

answered 2011-03-19 08:19:21 +0800

caclark gravatar image caclark
1753 2 5
http://clarktrips.intltwi...

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.

link publish delete flag offensive edit

answered 2011-03-19 08:20:32 +0800

caclark gravatar image caclark
1753 2 5
http://clarktrips.intltwi...

...funny Stephan...we were both typing essentially the same thing at the same time!

link publish delete flag offensive edit

answered 2011-03-19 08:35:44 +0800

dagarwal82 gravatar image dagarwal82
246 4

Also, you haven't added a databinding annotation.

link publish delete flag offensive edit

answered 2011-03-19 10:30:57 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

:-)

link publish delete flag offensive edit

answered 2011-03-19 15:34:04 +0800

caclark gravatar image caclark
1753 2 5
http://clarktrips.intltwi...

    Also, you haven't added a databinding annotation.

Why does he need that?

link publish delete flag offensive edit

answered 2011-03-20 02:32:05 +0800

dagarwal82 gravatar image dagarwal82
246 4

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.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-03-19 02:50:06 +0800

Seen: 257 times

Last updated: Mar 20 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More