Reputation: 177
when using a simple example of fulfill, inside a listbox, I get a null pointer exception, which I can't get rid of. http://zkfiddle.org/sample/38ipduo/44-Listbox-fulfill-attr-error
The fiddle above provides a working example of the error. Debugging the code, I can see the next line
org.zkoss.zk.ui.impl.UiEngineImpl$FulfillListener.<init>(UiEngineImpl.java:2058)
being called twice. The first time everything seems fine, but the second time it seems some data is not filled in, causing the NPE. Any ideas how can I work the fiddle work correctly? Man thanks in advance.
e.g.
<listcell>
<button id="btn" label="show" ></button>
<div fulfill="btn.onClick">
Hello world
</div>
<textbox value="@{person.name}" inplace="true" ></textbox>
</listcell>
I'm trying a list with a single record, as one initial answer in the zk forums suggested several id="btn" elements may be causing conflicts. THe fiddle is using zk 5. I have tried with 6.5 and got a similar error.
Upvotes: 1
Views: 475
Reputation: 3400
If you read the error when using 6.5 you see that zk trys to add the div
to the button
as a child which is impossible.
I am not sure if this is a bug you may check the fulfill
part of zk doc.
Using Event Listening and add the Component
on java side should be the best workaround.
Upvotes: 1