-
FEATURED COMPONENTS
First time here? Check out the FAQ!
hi,
i use the autowireing of variables by calling
Components.wireVariables(this, this); Components.addForwards(this, this);
and i get this error:
Cause: Unknown error: java.lang.NullPointerException. java.lang.NullPointerException at org.zkoss.zk.ui.Components$Wire.getImplicit(Components.java:658) at org.zkoss.zk.ui.Components$Wire.myGetImplicit(Components.java:642) at org.zkoss.zk.ui.Components$Wire.wireImplicit(Components.java:480) at org.zkoss.zk.ui.Components$Wire.myWireVariables(Components.java:474) at org.zkoss.zk.ui.Components$Wire.wireVariables(Components.java:471) at org.zkoss.zk.ui.Components.wireVariables(Components.java:348)
what can be the cause? thanks
Hi,
i have the same problem with the following code:
public class LabeledTextbox extends Div implements AfterCompose { // Optionen zur Erstellung der Komponente private static final String TEMPLATE = "/WEB-INF/view/components/labeledTextbox.zul"; // Autowired Felder protected Label label; protected Textbox textbox; public LabeledTextbox() { Executions.createComponents(TEMPLATE, this, null); } @Override public void afterCompose() { System.out.println(this); System.out.println(this.getFellows()); Components.wireVariables(this, this); } }
labeledTextbox.zul:
<!-- Template für beschriftete Textbox --> <zk> <label id="label" /> <textbox id="textbox" /> </zk>
Exception:
22.07.2009 16:24:13 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1128 SCHWERWIEGEND: >>java.lang.NullPointerException >> at org.zkoss.zk.ui.Components.getImplicit(Components.java:629) >> at org.zkoss.zk.ui.Components$Wire.myGetImplicit(Components.java:974) >> at org.zkoss.zk.ui.Components$Wire.wireImplicit(Components.java:803) >> at org.zkoss.zk.ui.Components$Wire.myWireVariables(Components.java:793) >> at org.zkoss.zk.ui.Components$Wire.wireVariables(Components.java:790) >> at org.zkoss.zk.ui.Components.wireVariables(Components.java:418) >>...
Hope someone can help.
Thank you in advance.
Asked: 2008-09-22 09:36:49 +0800
Seen: 336 times
Last updated: Jul 22 '09