-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello! I have installed for my first time zk in eclipse 3.5.2. I installed the zkStudio plug in for ecplipse. The "hello word" example works great. However when i add the code from the BandBoxes example i get annoying warnings in the zul file. The program is deployed all rigth but it i would like to know if i might have something configured wrong.
I created a zkProject with:
zk-bin-3.6.3
Apache Tomcat 6.0.26
Dynamic web boudle 2.5
I added the file example.zul with the following code:
<?page title="new page title" contentType="text/html;charset=UTF-8"?>
<zk>
<vbox>
<bandbox id="bd" >
<bandpopup>
<vbox>
<hbox>
Search
<textbox />
</hbox>
<listbox width="200px"
onSelect="bd.value=self.selectedItem.label; bd.close();">
<listhead>
<listheader label="Name" />
<listheader label="Description" />
</listhead>
<listitem>
<listcell label="John" />
<listcell label="CEO" />
</listitem>
<listitem>
<listcell label="Joe" />
<listcell label="Engineer" />
</listitem>
<listitem>
<listcell label="Mary" />
<listcell label="Supervisor" />
</listitem>
</listbox>
</vbox>
</bandpopup>
</bandbox>
<hbox>
<checkbox checked="false" onCheck="bd.autodrop = self.checked"
label="auto drop popup when typing" />
<checkbox checked="true"
onCheck="bd.buttonVisible = self.checked" label="button visible" />
<checkbox label="Use rounded bandbox" checked="true"
onCheck='bd.mold=self.checked? "rounded": "default"'/>
</hbox>
</vbox>
</zk>
The warings are all the same:
Multiple annotatinos found at this line:
-BD.XXXXXX cannot be resolved or it is not a field
-self.XXX cannot be resolved or it is not a filed
Any ideas?? I believe that i must have somtehing missing in the compiler options. I read several guides from the site but i was unsuccessful to make work.
Thanks in advance,
Hernan
You didn't get anything wrong, this is a part that ZK Studio's Zul Editor hard to implement.
ZK's current Zscript Java interpreter's implementation is based on BeanShell, and in BeanShell, instead of calling bean.setXXX(v);, you can declare bean.xxx = v;. Unfortunately Zul Editor can only read strict Java, so you got this "error" message.
To eliminate them you can rewrite those part back to standard Java form.
Hi iantsai, thanks for your help. I have written a few pages(10 ten) with jsf and i do not have everything very clear. In this example i haven't created any bean. I assume that bd is a bean created automatically by ZK. If it isn't too many trouble for you. Could you please rewrite a few parts of the code so that i would understated perfectly.
One last question, when i get all these warnings i lost the ide assistance for auto-complete on these elements. How do you usually make to have those features working?
Thank in advance for your help,
Hernan.
Hi nanchu,
For example, change your script from
<listbox width="200px" onSelect="bd.value=self.selectedItem.label; bd.close();">
to
<listbox width="200px" onSelect="bd.setValue(self.getSelectedItem().getLabel()); bd.close();">
Just substitute
xxx.yyy = ... ;
by
xxx.setYyy(...);
And on the variable reading side substitute
zzz.www
by
zzz.getWww()
Regards,
Simon
Simon Pai you really really saved me. I really appreciate your help. Thank you very much Iantsai and Simon Pai.
I think that this help must be added in a special section in the installation face. Yesterday i was really confused and i thought that i was doing something wrong.
Thank you very much!
Asked: 2010-04-12 07:07:28 +0800
Seen: 852 times
Last updated: Apr 12 '10
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